From 4703cd433d18c8c6d144a0e279891cf039add6e1 Mon Sep 17 00:00:00 2001 From: SamuXarick <43006711+SamuXarick@users.noreply.github.com> Date: Sun, 30 Sep 2018 19:34:40 +0100 Subject: Fix #6460: [AI] Add start_date parameter for Random AIs on new game --- src/openttd.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/openttd.cpp b/src/openttd.cpp index 88739a9ea..03c8aa286 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -365,6 +365,9 @@ void MakeNewgameSettingsLive() _settings_game.ai_config[c] = NULL; if (_settings_newgame.ai_config[c] != NULL) { _settings_game.ai_config[c] = new AIConfig(_settings_newgame.ai_config[c]); + if (!AIConfig::GetConfig(c, AIConfig::SSS_FORCE_GAME)->HasScript()) { + AIConfig::GetConfig(c, AIConfig::SSS_FORCE_GAME)->Change(NULL); + } } } _settings_game.game_config = NULL; -- cgit v1.2.3-70-g09d2