diff options
author | truebrain <truebrain@openttd.org> | 2011-11-29 23:26:52 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-11-29 23:26:52 +0000 |
commit | 3e6d0261291a1c91bf4f57c06fd9d180c175befc (patch) | |
tree | 11dcdfe79e138b991d531fa3d6955fdd99f5e428 /src/script/script_instance.cpp | |
parent | 4505edbd4715befb0944e91ad7f986a8ca83f113 (diff) | |
download | openttd-3e6d0261291a1c91bf4f57c06fd9d180c175befc.tar.xz |
(svn r23366) -Codechange: move most of the Dummy code to script/, unifying it
Diffstat (limited to 'src/script/script_instance.cpp')
-rw-r--r-- | src/script/script_instance.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/script_instance.cpp b/src/script/script_instance.cpp index beebe2fd7..97fdfd68f 100644 --- a/src/script/script_instance.cpp +++ b/src/script/script_instance.cpp @@ -78,8 +78,7 @@ void ScriptInstance::Initialize(const char *main_script, const char *instance_na ScriptObject::SetAllowDoCommand(false); /* Load and execute the script for this script */ if (strcmp(main_script, "%_dummy") == 0) { - extern void AI_CreateAIDummy(HSQUIRRELVM vm); - AI_CreateAIDummy(this->engine->GetVM()); + this->LoadDummyScript(); } else if (!this->engine->LoadScript(main_script) || this->engine->IsSuspended()) { if (this->engine->IsSuspended()) ScriptLog::Error("This script took too long to load script. AI is not started."); this->Died(); @@ -103,6 +102,7 @@ void ScriptInstance::Initialize(const char *main_script, const char *instance_na void ScriptInstance::RegisterAPI() { + extern void squirrel_register_std(Squirrel *engine); squirrel_register_std(this->engine); } |