attempt to fix morph out of synch

This commit is contained in:
Mark Vejvoda
2013-05-25 22:44:39 +00:00
parent 60a7ea172d
commit fd9ce54063
4 changed files with 42 additions and 5 deletions

View File

@@ -3019,6 +3019,9 @@ void ScriptManager::saveGame(XmlNode *rootNode) {
unRegisterCellTriggerEventListNode->addAttribute("eventId",intToStr(unRegisterCellTriggerEventList[i]), mapTagReplacements);
}
scriptManagerNode->addAttribute("registeredDayNightEvent",intToStr(registeredDayNightEvent), mapTagReplacements);
scriptManagerNode->addAttribute("lastDayNightTriggerStatus",intToStr(lastDayNightTriggerStatus), mapTagReplacements);
luaScript.saveGame(scriptManagerNode);
}
@@ -3129,6 +3132,13 @@ void ScriptManager::loadGame(const XmlNode *rootNode) {
unRegisterCellTriggerEventList.push_back(node->getAttribute("eventId")->getIntValue());
}
if(scriptManagerNode->hasAttribute("registeredDayNightEvent") == true) {
registeredDayNightEvent = scriptManagerNode->getAttribute("registeredDayNightEvent")->getIntValue() != 0;
}
if(scriptManagerNode->hasAttribute("lastDayNightTriggerStatus") == true) {
lastDayNightTriggerStatus = scriptManagerNode->getAttribute("lastDayNightTriggerStatus")->getIntValue();
}
luaScript.loadGame(scriptManagerNode);
}