Index: console_cmds.cpp
===================================================================
--- console_cmds.cpp (revision 27582)
+++ console_cmds.cpp (working copy)
@@ -34,6 +34,7 @@
#include "gamelog.h"
#include "ai/ai.hpp"
#include "ai/ai_config.hpp"
+#include "ai/ai_info.hpp"
#include "newgrf.h"
#include "console_func.h"
#include "engine_base.h"
@@ -1171,6 +1172,9 @@
if (!config->HasScript()) {
IConsoleWarning("Failed to load the specified AI");
return true;
+ } else {
+ AIInfo *info = config->GetInfo();
+ config->Change(info->GetName());
}
if (argc == 3) {
config->StringToSettings(argv[2]);