- bugfixes for save / load game bugs reported

This commit is contained in:
Mark Vejvoda 2012-04-02 15:02:44 +00:00
parent f80e440713
commit 5b5d753341
3 changed files with 5 additions and 2 deletions

View File

@ -3222,6 +3222,9 @@ void Game::checkWinner() {
}
void Game::checkWinnerStandard() {
if(world.getFactionCount() <= 0) {
return;
}
if(this->masterserverMode == true || world.getThisFaction()->getPersonalityType() == fpt_Observer) {
// lookup int is team #, value is players alive on team
std::map<int,int> teamsAlive;

View File

@ -590,7 +590,7 @@ void Program::setState(ProgramState *programStateNew, bool cleanupOldState) {
sprintf(szBuf,"In [%s::%s Line: %d]\nError [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,e.what());
SystemFlags::OutputDebug(SystemFlags::debugError,szBuf);
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,szBuf);
//abort();
abort();
messageBoxIsSystemError = true;

View File

@ -343,7 +343,7 @@ void LuaScript::loadGame(const XmlNode *rootNode) {
lua_pushnumber( luaState, node->getAttribute("value")->getIntValue() );
break;
case LUA_TBOOLEAN:
lua_pushboolean( luaState, node->getAttribute("value")->getIntValue() );
lua_pushboolean( luaState, node->getAttribute("value")->getBoolValue() );
break;
case LUA_TTABLE:
{