Decompile fn_10940 (UINameBalloonText::SetName)

Batch #13111 by cremane: 0 byte-identical, 1 confirmed by peer review.

- fn_10940 UINameBalloonText::SetName: logic confirmed by peer review

Peer-reviewed-by: gordaoprogramas, Tanke, codeplay
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-11-06 14:55:27 +00:00
commit 45d3aa8455

View file

@ -412,8 +412,8 @@ void UINameBalloonText::SetName(const CActorNameCard& info, bool stripHash, unsi
}
int width = 32;
for (const std::string& line : this->m_lines) {
const int lineWidth = this->TextWidth(line.c_str(), 0, 0, g_nameBalloonFontHeight, g_serviceFlag06, 0) + 8;
for (auto line = this->m_lines.begin(); line != this->m_lines.end(); ++line) {
const int lineWidth = this->TextWidth(line->c_str(), 0, 0, g_nameBalloonFontHeight, g_serviceFlag06, 0) + 8;
width = std::max(lineWidth, width);
}