From e3591f8a1d0b0e5a84cc8b9d45bb5809a622d1f2 Mon Sep 17 00:00:00 2001 From: yexo Date: Mon, 15 Mar 2010 22:42:43 +0000 Subject: (svn r19429) -Fix: when the title game contains an AIPL block the AI settinsg where overwritten by those from the title game --- src/saveload/ai_sl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/saveload/ai_sl.cpp') 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); -- cgit v1.2.3-54-g00ecf