- bugfix for loading older saved games (I added a new network player status which may not exist in older saved games). This should fix Pizza's load game issue

This commit is contained in:
Mark Vejvoda 2012-06-22 02:18:19 +00:00
parent 7315745316
commit 00d99eecd7
1 changed files with 4 additions and 2 deletions

View File

@ -475,8 +475,10 @@ public:
// int networkPlayerStatuses[GameConstants::maxPlayers];
for(int idx =0; idx < GameConstants::maxPlayers; idx++) {
const XmlNode *networkPlayerGameStatusNode = gameSettingsNode->getChild("networkPlayerGameStatus",idx);
networkPlayerGameStatus[idx] = networkPlayerGameStatusNode->getAttribute("game_status")->getIntValue();
if(gameSettingsNode->hasChildAtIndex("networkPlayerGameStatus",idx) == true) {
const XmlNode *networkPlayerGameStatusNode = gameSettingsNode->getChild("networkPlayerGameStatus",idx);
networkPlayerGameStatus[idx] = networkPlayerGameStatusNode->getAttribute("game_status")->getIntValue();
}
}
// string networkPlayerLanguages[GameConstants::maxPlayers];