From 57a988ae563e39bbe0b0ae91f772362f02d26676 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Tue, 10 Jul 2012 02:12:07 +0000 Subject: [PATCH] - fixed out of synch on player disconnect --- source/glest_game/game/commander.cpp | 3 ++- source/glest_game/menu/menu_state_custom_game.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/glest_game/game/commander.cpp b/source/glest_game/game/commander.cpp index f1bbbac3..8a11d133 100644 --- a/source/glest_game/game/commander.cpp +++ b/source/glest_game/game/commander.cpp @@ -510,7 +510,8 @@ CommandResult Commander::pushNetworkCommand(const NetworkCommand* networkCommand const Unit* unit = NULL; if( networkCommand->getNetworkCommandType() != nctSwitchTeam && networkCommand->getNetworkCommandType() != nctSwitchTeamVote && - networkCommand->getNetworkCommandType() != nctPauseResume) { + networkCommand->getNetworkCommandType() != nctPauseResume && + networkCommand->getNetworkCommandType() != nctPlayerStatusChange) { unit= world->findUnitById(networkCommand->getUnitId()); if(unit == NULL) { char szBuf[1024]=""; diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index f139e2a0..4c5e1759 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -1970,7 +1970,7 @@ void MenuStateCustomGame::switchSetupForSlots(SwitchSetupRequest **switchSetupRe ServerInterface *& serverInterface, int startIndex, int endIndex, bool onlyNetworkUnassigned) { for(int i= startIndex; i < endIndex; ++i) { if(switchSetupRequests[i] != NULL) { - printf("Switch slot = %d control = %d newIndex = %d currentindex = %d onlyNetworkUnassigned = %d\n",i,listBoxControls[i].getSelectedItemIndex(),switchSetupRequests[i]->getToFactionIndex(),switchSetupRequests[i]->getCurrentFactionIndex(),onlyNetworkUnassigned); + //printf("Switch slot = %d control = %d newIndex = %d currentindex = %d onlyNetworkUnassigned = %d\n",i,listBoxControls[i].getSelectedItemIndex(),switchSetupRequests[i]->getToFactionIndex(),switchSetupRequests[i]->getCurrentFactionIndex(),onlyNetworkUnassigned); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] switchSetupRequests[i]->getSwitchFlags() = %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,switchSetupRequests[i]->getSwitchFlags());