- attempt to bugfix lua save/load games, added a new section for scenario files called:

<global>
</global>
Where global vars (but more importantly declared functions) should be declared
- updated amazones scenario to move globals into the global section
This commit is contained in:
Mark Vejvoda 2012-03-29 22:30:58 +00:00
parent 7cdf6eedd3
commit 435e06db20
1 changed files with 4 additions and 0 deletions

View File

@ -341,6 +341,10 @@ void ScriptManager::init(World* world, GameCamera *gameCamera, const XmlNode *ro
if(SystemFlags::getSystemSettingType(SystemFlags::debugLUA).enabled) SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
// Setup global functions and vars here
luaScript.beginCall("global");
luaScript.endCall();
//call startup function
if(this->rootNode == NULL) {
luaScript.beginCall("startup");