mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-11 16:54:42 +00:00
Sign width was only updated when the text was changed. This seems to work for player-placed signs as there is always a rename operation, however AIs can create a sign with text in one go, in which case the width was never set.
This commit is contained in:
parent
a4073895ae
commit
698241e16e
@ -58,6 +58,7 @@ CommandCost CmdPlaceSign(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
if (!StrEmpty(text)) {
|
||||
si->name = stredup(text);
|
||||
}
|
||||
si->UpdateVirtCoord();
|
||||
_viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeSign(si->index));
|
||||
InvalidateWindowData(WC_SIGN_LIST, 0, 0);
|
||||
_new_sign_id = si->index;
|
||||
|
Loading…
Reference in New Issue
Block a user