summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-01-29 00:03:31 +0000
committeryexo <yexo@openttd.org>2010-01-29 00:03:31 +0000
commitfae34ee719a90dc7b7d68b54b97fb5485387b356 (patch)
tree2f584e6bf3765b262d9ade84f32bcd222b5ca015 /src/saveload
parentd75b9f1642f24dd3336437d818b41c2a6d295905 (diff)
downloadopenttd-fae34ee719a90dc7b7d68b54b97fb5485387b356.tar.xz
(svn r18944) -Change [FS#3232]: use the highest version of an AI that can load the AI data from a savegame instead of the exact same version
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/ai_sl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/saveload/ai_sl.cpp b/src/saveload/ai_sl.cpp
index a69f3da60..2a0e5d4ad 100644
--- a/src/saveload/ai_sl.cpp
+++ b/src/saveload/ai_sl.cpp
@@ -75,13 +75,13 @@ static void Load_AIPL()
AIConfig *config = AIConfig::GetConfig(index);
if (StrEmpty(_ai_saveload_name)) {
/* A random AI. */
- config->ChangeAI(NULL, -1, true);
+ config->ChangeAI(NULL, -1, false, true);
} else {
- config->ChangeAI(_ai_saveload_name, _ai_saveload_version, _ai_saveload_is_random);
+ config->ChangeAI(_ai_saveload_name, _ai_saveload_version, false, _ai_saveload_is_random);
if (!config->HasAI()) {
/* No version of the AI available that can load the data. Try to load the
* latest version of the AI instead. */
- config->ChangeAI(_ai_saveload_name, -1, _ai_saveload_is_random);
+ config->ChangeAI(_ai_saveload_name, -1, false, _ai_saveload_is_random);
if (!config->HasAI()) {
if (strcmp(_ai_saveload_name, "%_dummy") != 0) {
DEBUG(ai, 0, "The savegame has an AI by the name '%s', version %d which is no longer available.", _ai_saveload_name, _ai_saveload_version);