File diff r21282:5b76c1614957 → r21283:ba592c088a09
src/openttd.cpp
Show inline comments
 
@@ -1352,21 +1352,20 @@ void StateGameLoop()
 
#endif
 
		CallWindowTickEvent();
 
		return;
 
	}
 
	if (HasModalProgress()) return;
 

	
 
	ClearPersistentStorageChanges(false);
 

	
 
	Layouter::ReduceLineCache();
 

	
 
	if (_game_mode == GM_EDITOR) {
 
		BasePersistentStorageArray::SwitchMode(PSM_ENTER_GAMELOOP);
 
		RunTileLoop();
 
		CallVehicleTicks();
 
		CallLandscapeTick();
 
		ClearPersistentStorageChanges(true);
 
		BasePersistentStorageArray::SwitchMode(PSM_LEAVE_GAMELOOP);
 
		UpdateLandscapingLimits();
 

	
 
		CallWindowTickEvent();
 
		NewsLoop();
 
	} else {
 
		if (_debug_desync_level > 2 && _date_fract == 0 && (_date & 0x1F) == 0) {
 
@@ -1379,18 +1378,19 @@ void StateGameLoop()
 
		CheckCaches();
 

	
 
		/* All these actions has to be done from OWNER_NONE
 
		 *  for multiplayer compatibility */
 
		Backup<CompanyByte> cur_company(_current_company, OWNER_NONE, FILE_LINE);
 

	
 
		BasePersistentStorageArray::SwitchMode(PSM_ENTER_GAMELOOP);
 
		AnimateAnimatedTiles();
 
		IncreaseDate();
 
		RunTileLoop();
 
		CallVehicleTicks();
 
		CallLandscapeTick();
 
		ClearPersistentStorageChanges(true);
 
		BasePersistentStorageArray::SwitchMode(PSM_LEAVE_GAMELOOP);
 

	
 
#ifndef DEBUG_DUMP_COMMANDS
 
		AI::GameLoop();
 
		Game::GameLoop();
 
#endif
 
		UpdateLandscapingLimits();