Codechange: Pass preformatted string when updating sign positions. (#13480)
This forces the strings to be formatted in advance and avoids using global string parameters.
This commit is contained in:
@@ -44,8 +44,7 @@ void Waypoint::UpdateVirtCoord()
|
||||
Point pt = RemapCoords2(TileX(this->xy) * TILE_SIZE, TileY(this->xy) * TILE_SIZE);
|
||||
if (this->sign.kdtree_valid) _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeWaypoint(this->index));
|
||||
|
||||
SetDParam(0, this->index);
|
||||
this->sign.UpdatePosition(pt.x, pt.y - 32 * ZOOM_BASE, STR_WAYPOINT_NAME);
|
||||
this->sign.UpdatePosition(pt.x, pt.y - 32 * ZOOM_BASE, GetString(STR_WAYPOINT_NAME, this->index));
|
||||
|
||||
_viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeWaypoint(this->index));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user