mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 07:29:44 +00:00
An invalid starting year causes all sorts of weird behaviour and crashes in map generation. Now just set the appropriate setting via IConsoleSetSetting so the validation and, if needed, clamping is performed on the starting year value.
This commit is contained in:
parent
fdc8230dfa
commit
df045b92ea
@ -455,7 +455,7 @@ struct AfterNewGRFScan : NewGRFScanCallback {
|
||||
/* restore saved music volume */
|
||||
MusicDriver::GetInstance()->SetVolume(_settings_client.music.music_vol);
|
||||
|
||||
if (startyear != INVALID_YEAR) _settings_newgame.game_creation.starting_year = startyear;
|
||||
if (startyear != INVALID_YEAR) IConsoleSetSetting("game_creation.starting_year", startyear);
|
||||
if (generation_seed != GENERATE_NEW_SEED) _settings_newgame.game_creation.generation_seed = generation_seed;
|
||||
|
||||
if (dedicated_host != nullptr) {
|
||||
|
Loading…
Reference in New Issue
Block a user