(svn r19429) -Fix: when the title game contains an AIPL block the AI settinsg where overwritten by those from the title game

This commit is contained in:
yexo
2010-03-15 22:42:43 +00:00
parent 30189ff459
commit e3591f8a1d
4 changed files with 18 additions and 10 deletions

View File

@@ -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);