Changeset - r23929:bfb0e0f0810a
[Not reviewed]
master
0 1 0
glx22 - 5 years ago 2019-11-14 20:13:15
glx22@users.noreply.github.com
Fix #7646: Incomplete cleanup for non-threaded world generation failure (#7805)
1 file changed with 7 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/genworld.cpp
Show inline comments
 
@@ -133,11 +133,17 @@ static void _GenerateWorld()
 
			GenerateLandscape(_gw.mode);
 
			GenerateClearTile();
 

	
 
			/* only generate towns, tree and industries in newgame mode. */
 
			/* Only generate towns, tree and industries in newgame mode. */
 
			if (_game_mode != GM_EDITOR) {
 
				if (!GenerateTowns(_settings_game.economy.town_layout)) {
 
					_cur_company.Restore();
 
					HandleGeneratingWorldAbortion();
 
					BasePersistentStorageArray::SwitchMode(PSM_LEAVE_GAMELOOP);
 
					if (_network_dedicated) {
 
						/* Exit the game to prevent a return to main menu.  */
 
						DEBUG(net, 0, "Generating map failed, aborting");
 
						_exit_game = true;
 
					}
 
					return;
 
				}
 
				GenerateIndustries();
0 comments (0 inline, 0 general)