(svn r15095) -Add [NoAI]: allow AI Libraries to be in .tar files (subdir required, as with AIs
-Add [NoAI]: allow multiple versions of the same AI co-exist -Change [NoAI]: updated the whole method of AI (Library) finding and loading; it is now much more clear and transparent -Change [NoAI]: the name of the AI is now the name used by CreateInstance() -Change [NoAI]: make the AI finder a bit more clever, mostly related to version finding
This commit is contained in:
@@ -114,11 +114,11 @@ AIInstance::AIInstance(AIInfo *info) :
|
||||
SQAIController_Register(this->engine);
|
||||
|
||||
/* Load and execute the script for this AI */
|
||||
const char *script_name = info->GetScriptName();
|
||||
if (strcmp(script_name, "%_dummy") == 0) {
|
||||
const char *main_script = info->GetMainScript();
|
||||
if (strcmp(main_script, "%_dummy") == 0) {
|
||||
extern void AI_CreateAIDummy(HSQUIRRELVM vm);
|
||||
AI_CreateAIDummy(this->engine->GetVM());
|
||||
} else if (!this->engine->LoadScript(script_name)) {
|
||||
} else if (!this->engine->LoadScript(main_script)) {
|
||||
this->Died();
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user