1
0
Fork 0

(svn r19592) -Fix: don't do the desync debug savegames mid-StateGameLoop; they're increadibly useless (or hard to load correctly) in that case

release/1.1
rubidium 2010-04-09 16:01:48 +00:00
parent a7e31778b3
commit 12e75643af
2 changed files with 7 additions and 6 deletions

View File

@ -218,12 +218,6 @@ static void OnNewYear()
*/
static void OnNewMonth()
{
if (_debug_desync_level > 2) {
char name[MAX_PATH];
snprintf(name, lengthof(name), "dmp_cmds_%08x_%08x.sav", _settings_game.game_creation.generation_seed, _date);
SaveOrLoad(name, SL_SAVE, AUTOSAVE_DIR);
}
if (_settings_client.gui.autosave != 0 && (_cur_month % _autosave_months[_settings_client.gui.autosave]) == 0) {
_do_autosave = true;
RedrawAutosave();

View File

@ -1206,6 +1206,13 @@ void StateGameLoop()
} else {
CheckCaches();
if (_debug_desync_level > 2 && _date_fract == 0 && (_date & 0x1F) == 0) {
/* Save the desync savegame if needed. */
char name[MAX_PATH];
snprintf(name, lengthof(name), "dmp_cmds_%08x_%08x.sav", _settings_game.game_creation.generation_seed, _date);
SaveOrLoad(name, SL_SAVE, AUTOSAVE_DIR);
}
/* All these actions has to be done from OWNER_NONE
* for multiplayer compatibility */
CompanyID old_company = _current_company;