Fix handling of viewport kd-tree in CmdDeleteTown
This commit is contained in:
@@ -3116,7 +3116,7 @@ CommandCost CmdDeleteTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
|||||||
/* The town destructor will delete the other things related to the town. */
|
/* The town destructor will delete the other things related to the town. */
|
||||||
if (flags & DC_EXEC) {
|
if (flags & DC_EXEC) {
|
||||||
_town_kdtree.Remove(t->index);
|
_town_kdtree.Remove(t->index);
|
||||||
_viewport_sign_kdtree.Insert(ViewportSignKdtreeItem::MakeTown(t->index));
|
_viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeTown(t->index));
|
||||||
delete t;
|
delete t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user