- fixed out of synch on player disconnect

This commit is contained in:
Mark Vejvoda 2012-07-10 02:12:07 +00:00
parent 36ef593c56
commit 57a988ae56
2 changed files with 3 additions and 2 deletions

View File

@ -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]="";

View File

@ -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());