Changeset - r20746:f138a826b65b
[Not reviewed]
master
0 1 0
zuu - 11 years ago 2013-09-21 15:09:00
zuu@openttd.org
(svn r25789) -Fix (r25783): Calling GSTown.FoundTown in world gen caused world gen to terminate and start the game
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/town_cmd.cpp
Show inline comments
 
@@ -1667,7 +1667,7 @@ CommandCost CmdFoundTown(TileIndex tile,
 
			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,
 
			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);
0 comments (0 inline, 0 general)