diff options
author | yexo <yexo@openttd.org> | 2010-01-29 00:03:31 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-01-29 00:03:31 +0000 |
commit | fae34ee719a90dc7b7d68b54b97fb5485387b356 (patch) | |
tree | 2f584e6bf3765b262d9ade84f32bcd222b5ca015 /src/ai/ai_config.cpp | |
parent | d75b9f1642f24dd3336437d818b41c2a6d295905 (diff) | |
download | openttd-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/ai/ai_config.cpp')
-rw-r--r-- | src/ai/ai_config.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/ai_config.cpp b/src/ai/ai_config.cpp index 4b725728a..c0ae01848 100644 --- a/src/ai/ai_config.cpp +++ b/src/ai/ai_config.cpp @@ -16,11 +16,11 @@ #include "ai.hpp" #include "ai_config.hpp" -void AIConfig::ChangeAI(const char *name, int version, bool is_random_ai) +void AIConfig::ChangeAI(const char *name, int version, bool force_exact_match, bool is_random_ai) { free((void *)this->name); this->name = (name == NULL) ? NULL : strdup(name); - this->info = (name == NULL) ? NULL : AI::FindInfo(this->name, version); + this->info = (name == NULL) ? NULL : AI::FindInfo(this->name, version, force_exact_match); this->version = (info == NULL) ? -1 : info->GetVersion(); this->is_random_ai = is_random_ai; if (this->config_list != NULL) delete this->config_list; @@ -79,7 +79,7 @@ AIInfo *AIConfig::GetInfo() const bool AIConfig::ResetInfo() { - this->info = AI::FindInfo(this->name, -1); + this->info = AI::FindInfo(this->name, -1, false); return this->info != NULL; } |