From 3e7f3ed485308781481ed5bdcc94c419899cafba Mon Sep 17 00:00:00 2001 From: Titus Tscharntke Date: Fri, 30 Apr 2010 18:36:38 +0000 Subject: [PATCH] client slot selection bug hopefully fixed --- .../menu/menu_state_connected_game.cpp | 16 ---------------- source/glest_game/network/server_interface.cpp | 2 ++ 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/source/glest_game/menu/menu_state_connected_game.cpp b/source/glest_game/menu/menu_state_connected_game.cpp index 91d98e685..3d205bc4a 100644 --- a/source/glest_game/menu/menu_state_connected_game.cpp +++ b/source/glest_game/menu/menu_state_connected_game.cpp @@ -200,22 +200,6 @@ void MenuStateConnectedGame::mouseClick(int x, int y, MouseButton mouseButton){ soundRenderer.playFx(coreData.getClickSoundC()); SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__); } - else if(listBoxMap.mouseClick(x, y)){ - - } - else if (listBoxFogOfWar.mouseClick(x, y)) { - } - else if(listBoxTileset.mouseClick(x, y)){ - } - else if(listBoxTechTree.mouseClick(x, y)){ - //reloadFactions(); - - if(hasNetworkGameSettings() == true) - { - needToSetChangedGameSettings = true; - lastSetChangedGameSettings = time(NULL);; - } - } else { int myCurrentIndex=-1; diff --git a/source/glest_game/network/server_interface.cpp b/source/glest_game/network/server_interface.cpp index ef1e1d289..d94aa4dff 100644 --- a/source/glest_game/network/server_interface.cpp +++ b/source/glest_game/network/server_interface.cpp @@ -86,12 +86,14 @@ bool ServerInterface::switchSlot(int fromPlayerIndex,int toPlayerIndex){ if( !slots[toPlayerIndex]->isConnected()) { //printf(" yes, its free :)\n"); slots[fromPlayerIndex]->setPlayerIndex(toPlayerIndex); + slots[toPlayerIndex]->setPlayerIndex(fromPlayerIndex); ConnectionSlot *tmp=slots[toPlayerIndex]; slots[toPlayerIndex]= slots[fromPlayerIndex]; slots[fromPlayerIndex]=tmp; PlayerIndexMessage playerIndexMessage(toPlayerIndex); slots[toPlayerIndex]->sendMessage(&playerIndexMessage); result=true; + updateListen(); } SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] END\n",__FILE__,__FUNCTION__); return result;