mirror of https://github.com/OpenTTD/OpenTTD
Fix: When restarting after a new game, use the seed of the current game
parent
0b9c54f987
commit
8081f8bd12
|
@ -1227,7 +1227,12 @@ DEF_CONSOLE_CMD(ConRestart)
|
||||||
/* Don't copy the _newgame pointers to the real pointers, so call SwitchToMode directly */
|
/* Don't copy the _newgame pointers to the real pointers, so call SwitchToMode directly */
|
||||||
_settings_game.game_creation.map_x = Map::LogX();
|
_settings_game.game_creation.map_x = Map::LogX();
|
||||||
_settings_game.game_creation.map_y = Map::LogY();
|
_settings_game.game_creation.map_y = Map::LogY();
|
||||||
_switch_mode = SM_RESTARTGAME;
|
if (_file_to_saveload.abstract_ftype == FT_SAVEGAME || _file_to_saveload.abstract_ftype == FT_SCENARIO || _file_to_saveload.abstract_ftype == FT_HEIGHTMAP) {
|
||||||
|
_switch_mode = SM_RESTARTGAME;
|
||||||
|
} else {
|
||||||
|
_settings_newgame.game_creation.generation_seed = _settings_game.game_creation.generation_seed;
|
||||||
|
_switch_mode = SM_NEWGAME;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue