- fix saved games in headless server mode

This commit is contained in:
Mark Vejvoda 2012-03-14 23:25:47 +00:00
parent 7425dc8fdf
commit 8860fd0dc8
2 changed files with 8 additions and 6 deletions

View File

@ -226,11 +226,13 @@ void Minimap::saveGame(XmlNode *rootNode) {
// Pixmap2D *fowPixmap0;
// Pixmap2D *fowPixmap1;
for(unsigned int i = 0; i < fowPixmap1->getPixelByteCount(); ++i) {
if(fowPixmap1->getPixels()[i] != 0) {
XmlNode *fowPixmap1Node = minimapNode->addChild("fowPixmap1");
fowPixmap1Node->addAttribute("index",intToStr(i), mapTagReplacements);
fowPixmap1Node->addAttribute("pixel",intToStr(fowPixmap1->getPixels()[i]), mapTagReplacements);
if(fowPixmap1 != NULL) {
for(unsigned int i = 0; i < fowPixmap1->getPixelByteCount(); ++i) {
if(fowPixmap1->getPixels()[i] != 0) {
XmlNode *fowPixmap1Node = minimapNode->addChild("fowPixmap1");
fowPixmap1Node->addAttribute("index",intToStr(i), mapTagReplacements);
fowPixmap1Node->addAttribute("pixel",intToStr(fowPixmap1->getPixels()[i]), mapTagReplacements);
}
}
}
// Texture2D *tex;

View File

@ -312,7 +312,7 @@ XmlNode *XmlIoRapid::load(const string &path, std::map<string,string> mapTagRepl
throw runtime_error(szBuf);
}
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] took msecs: %lld\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis());
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] took msecs: %ld\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis());
return rootNode;
}