- small fix for map state

This commit is contained in:
Mark Vejvoda 2012-03-13 22:23:42 +00:00
parent 917adc8c98
commit 9a1b4cf680
1 changed files with 3 additions and 1 deletions

View File

@ -1890,8 +1890,9 @@ void Map::saveGame(XmlNode *rootNode) const {
surfaceCell.saveGame(mapNode,i);
if(i % 100 == 0) {
if(i > 0 && i % 100 == 0) {
XmlNode *surfaceCellNode = mapNode->addChild("SurfaceCell");
surfaceCellNode->addAttribute("batchIndex",intToStr(i), mapTagReplacements);
surfaceCellNode->addAttribute("exploredList",exploredList, mapTagReplacements);
surfaceCellNode->addAttribute("visibleList",visibleList, mapTagReplacements);
@ -1902,6 +1903,7 @@ void Map::saveGame(XmlNode *rootNode) const {
if(exploredList != "") {
XmlNode *surfaceCellNode = mapNode->addChild("SurfaceCell");
surfaceCellNode->addAttribute("batchIndex",intToStr(getSurfaceCellArraySize()), mapTagReplacements);
surfaceCellNode->addAttribute("exploredList",exploredList, mapTagReplacements);
surfaceCellNode->addAttribute("visibleList",visibleList, mapTagReplacements);
}