summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-02-10 16:24:05 +0000
committerrubidium <rubidium@openttd.org>2010-02-10 16:24:05 +0000
commit21bd2722cd89995370523385c213da32c8d47100 (patch)
treee7f3bb43657b1f8a59f89899dfc582d480bedad0 /src/openttd.cpp
parent78ce2858fc2704a5aafbc0b76cdb636338122f63 (diff)
downloadopenttd-21bd2722cd89995370523385c213da32c8d47100.tar.xz
(svn r19081) -Codechange: make it possible to disable compilation of the AI+Squirrel
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 255e76767..47f3e804a 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -385,20 +385,24 @@ static void LoadIntroGame()
void MakeNewgameSettingsLive()
{
+#ifdef ENABLE_AI
for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) {
if (_settings_game.ai_config[c] != NULL) {
delete _settings_game.ai_config[c];
}
}
+#endif /* ENABLE_AI */
_settings_game = _settings_newgame;
+#ifdef ENABLE_AI
for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) {
_settings_game.ai_config[c] = NULL;
if (_settings_newgame.ai_config[c] != NULL) {
_settings_game.ai_config[c] = new AIConfig(_settings_newgame.ai_config[c]);
}
}
+#endif /* ENABLE_AI */
}
byte _savegame_sort_order;