diff options
author | frosch <frosch@openttd.org> | 2012-04-09 12:35:01 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-04-09 12:35:01 +0000 |
commit | d7d89bc80610beae24ab24b7368f4c28e1ad1cda (patch) | |
tree | 373c6461df1c051390b18234330eea5c3412d9fc /src/ai/ai_core.cpp | |
parent | c425368a17fa4e48b9aea187aaa96ddc9aaf7bf5 (diff) | |
download | openttd-d7d89bc80610beae24ab24b7368f4c28e1ad1cda.tar.xz |
(svn r24108) -Fix [FS#5142]: When starting GS or AI, always use the settings of the game, not the new-game settings.
Diffstat (limited to 'src/ai/ai_core.cpp')
-rw-r--r-- | src/ai/ai_core.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp index ed2945cf3..82e2c7809 100644 --- a/src/ai/ai_core.cpp +++ b/src/ai/ai_core.cpp @@ -39,7 +39,7 @@ /* Clients shouldn't start AIs */ if (_networking && !_network_server) return; - AIConfig *config = AIConfig::GetConfig(company); + AIConfig *config = AIConfig::GetConfig(company, AIConfig::SSS_FORCE_GAME); AIInfo *info = config->GetInfo(); if (info == NULL || (rerandomise_ai && config->IsRandom())) { info = AI::scanner_info->SelectRandomAI(); @@ -283,7 +283,7 @@ { /* Find the first company which doesn't exist yet */ for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) { - if (!Company::IsValidID(c)) return AIConfig::GetConfig(c)->GetSetting("start_date"); + if (!Company::IsValidID(c)) return AIConfig::GetConfig(c, AIConfig::SSS_FORCE_GAME)->GetSetting("start_date"); } /* Currently no AI can be started, check again in a year. */ |