diff options
-rw-r--r-- | src/town_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 7241f7ed4..e16ff4836 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1667,7 +1667,7 @@ CommandCost CmdFoundTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 return CommandCost(EXPENSES_OTHER); } - _generating_world = true; + Backup<bool> old_generating_world(_generating_world, true, FILE_LINE); UpdateNearestTownForRoadTiles(true); Town *t; if (random) { @@ -1682,7 +1682,7 @@ CommandCost CmdFoundTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 DoCreateTown(t, tile, townnameparts, size, city, layout, true); } UpdateNearestTownForRoadTiles(false); - _generating_world = false; + old_generating_world.Restore(); if (t != NULL && !StrEmpty(text)) { t->name = strdup(text); |