summaryrefslogtreecommitdiff
path: root/src/ai/ai_config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai/ai_config.cpp')
-rw-r--r--src/ai/ai_config.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/ai_config.cpp b/src/ai/ai_config.cpp
index b93bf76b4..186d6d6e3 100644
--- a/src/ai/ai_config.cpp
+++ b/src/ai/ai_config.cpp
@@ -9,11 +9,11 @@
#include "ai_config.hpp"
#include "ai_info.hpp"
-void AIConfig::ChangeAI(const char *name)
+void AIConfig::ChangeAI(const char *name, int version)
{
free((void *)this->name);
this->name = (name == NULL) ? NULL : strdup(name);
- this->info = (name == NULL) ? NULL : AI::GetCompanyInfo(this->name);
+ this->info = (name == NULL) ? NULL : AI::FindInfo(this->name, version);
this->version = (info == NULL) ? -1 : info->GetVersion();
for (SettingValueList::iterator it = this->settings.begin(); it != this->settings.end(); it++) {
@@ -45,7 +45,7 @@ AIInfo *AIConfig::GetInfo()
bool AIConfig::ResetInfo()
{
- this->info = AI::GetCompanyInfo(this->name);
+ this->info = AI::FindInfo(this->name, this->version);
return this->info != NULL;
}