1
0
Fork 0

(svn r17043) -Change [NoAI]: Load the API before compiling an AI script so AIs can subclass API classes and use API constants as part of their own constants

release/1.0
yexo 2009-08-02 18:26:32 +00:00
parent 059328e85e
commit 8c2709d97f
1 changed files with 3 additions and 3 deletions

View File

@ -121,6 +121,9 @@ AIInstance::AIInstance(AIInfo *info) :
/* Register the AIController */
SQAIController_Register(this->engine);
/* Register the API functions and classes */
this->RegisterAPI();
/* Load and execute the script for this AI */
const char *main_script = info->GetMainScript();
if (strcmp(main_script, "%_dummy") == 0) {
@ -137,9 +140,6 @@ AIInstance::AIInstance(AIInfo *info) :
this->Died();
return;
}
/* Register the API functions and classes */
this->RegisterAPI();
}
AIInstance::~AIInstance()