ensure load saved games checks if new attribute exists

This commit is contained in:
Mark Vejvoda 2013-11-07 05:20:02 +00:00
parent 4a70fd09e2
commit b7a7d3bc4a
1 changed files with 3 additions and 1 deletions

View File

@ -6654,7 +6654,9 @@ void Game::loadGame(string name,Program *programPtr,bool isMasterserverMode,cons
newGame->timeDisplay = gameNode->getAttribute("timeDisplay")->getIntValue() != 0;
newGame->disableSpeedChange = gameNode->getAttribute("disableSpeedChange")->getIntValue() != 0;
if(gameNode->hasAttribute("disableSpeedChange") == true) {
newGame->disableSpeedChange = gameNode->getAttribute("disableSpeedChange")->getIntValue() != 0;
}
//bool gameStarted;
//gameNode->addAttribute("gameStarted",intToStr(gameStarted), mapTagReplacements);