summaryrefslogtreecommitdiff
path: root/src/saveload/ai_sl.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-03-15 22:42:43 +0000
committeryexo <yexo@openttd.org>2010-03-15 22:42:43 +0000
commite3591f8a1d0b0e5a84cc8b9d45bb5809a622d1f2 (patch)
tree93ba6a93348ba5abc5fa64a3ef933a5319f27349 /src/saveload/ai_sl.cpp
parent30189ff459d08142baa9fac9f67dd6246faeae27 (diff)
downloadopenttd-e3591f8a1d0b0e5a84cc8b9d45bb5809a622d1f2.tar.xz
(svn r19429) -Fix: when the title game contains an AIPL block the AI settinsg where overwritten by those from the title game
Diffstat (limited to 'src/saveload/ai_sl.cpp')
-rw-r--r--src/saveload/ai_sl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/saveload/ai_sl.cpp b/src/saveload/ai_sl.cpp
index a9ae30020..6a8fb2b1a 100644
--- a/src/saveload/ai_sl.cpp
+++ b/src/saveload/ai_sl.cpp
@@ -61,7 +61,7 @@ static void Load_AIPL()
{
/* Free all current data */
for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) {
- AIConfig::GetConfig(c)->ChangeAI(NULL);
+ AIConfig::GetConfig(c, AIConfig::AISS_FORCE_GAME)->ChangeAI(NULL);
}
CompanyID index;
@@ -74,7 +74,7 @@ static void Load_AIPL()
continue;
}
- AIConfig *config = AIConfig::GetConfig(index);
+ AIConfig *config = AIConfig::GetConfig(index, AIConfig::AISS_FORCE_GAME);
if (StrEmpty(_ai_saveload_name)) {
/* A random AI. */
config->ChangeAI(NULL, -1, false, true);