Fix #6460: [AI] Add start_date parameter for Random AIs on new game

This commit is contained in:
SamuXarick 2018-09-30 19:34:40 +01:00 committed by Niels Martin Hansen
parent b3b89257f7
commit 4703cd433d

View File

@ -365,6 +365,9 @@ void MakeNewgameSettingsLive()
_settings_game.ai_config[c] = NULL; _settings_game.ai_config[c] = NULL;
if (_settings_newgame.ai_config[c] != NULL) { if (_settings_newgame.ai_config[c] != NULL) {
_settings_game.ai_config[c] = new AIConfig(_settings_newgame.ai_config[c]); _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; _settings_game.game_config = NULL;