mirror of
https://github.com/glest/glest-source.git
synced 2025-08-23 08:22:50 +02:00
- fix saved games in headless server mode
This commit is contained in:
@@ -226,11 +226,13 @@ void Minimap::saveGame(XmlNode *rootNode) {
|
|||||||
|
|
||||||
// Pixmap2D *fowPixmap0;
|
// Pixmap2D *fowPixmap0;
|
||||||
// Pixmap2D *fowPixmap1;
|
// Pixmap2D *fowPixmap1;
|
||||||
for(unsigned int i = 0; i < fowPixmap1->getPixelByteCount(); ++i) {
|
if(fowPixmap1 != NULL) {
|
||||||
if(fowPixmap1->getPixels()[i] != 0) {
|
for(unsigned int i = 0; i < fowPixmap1->getPixelByteCount(); ++i) {
|
||||||
XmlNode *fowPixmap1Node = minimapNode->addChild("fowPixmap1");
|
if(fowPixmap1->getPixels()[i] != 0) {
|
||||||
fowPixmap1Node->addAttribute("index",intToStr(i), mapTagReplacements);
|
XmlNode *fowPixmap1Node = minimapNode->addChild("fowPixmap1");
|
||||||
fowPixmap1Node->addAttribute("pixel",intToStr(fowPixmap1->getPixels()[i]), mapTagReplacements);
|
fowPixmap1Node->addAttribute("index",intToStr(i), mapTagReplacements);
|
||||||
|
fowPixmap1Node->addAttribute("pixel",intToStr(fowPixmap1->getPixels()[i]), mapTagReplacements);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Texture2D *tex;
|
// Texture2D *tex;
|
||||||
|
@@ -312,7 +312,7 @@ XmlNode *XmlIoRapid::load(const string &path, std::map<string,string> mapTagRepl
|
|||||||
throw runtime_error(szBuf);
|
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;
|
return rootNode;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user