client slot selection bug hopefully fixed

This commit is contained in:
Titus Tscharntke
2010-04-30 18:36:38 +00:00
parent c53ff62c46
commit 3e7f3ed485
2 changed files with 2 additions and 16 deletions

View File

@@ -200,22 +200,6 @@ void MenuStateConnectedGame::mouseClick(int x, int y, MouseButton mouseButton){
soundRenderer.playFx(coreData.getClickSoundC()); soundRenderer.playFx(coreData.getClickSoundC());
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__); 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 else
{ {
int myCurrentIndex=-1; int myCurrentIndex=-1;

View File

@@ -86,12 +86,14 @@ bool ServerInterface::switchSlot(int fromPlayerIndex,int toPlayerIndex){
if( !slots[toPlayerIndex]->isConnected()) { if( !slots[toPlayerIndex]->isConnected()) {
//printf(" yes, its free :)\n"); //printf(" yes, its free :)\n");
slots[fromPlayerIndex]->setPlayerIndex(toPlayerIndex); slots[fromPlayerIndex]->setPlayerIndex(toPlayerIndex);
slots[toPlayerIndex]->setPlayerIndex(fromPlayerIndex);
ConnectionSlot *tmp=slots[toPlayerIndex]; ConnectionSlot *tmp=slots[toPlayerIndex];
slots[toPlayerIndex]= slots[fromPlayerIndex]; slots[toPlayerIndex]= slots[fromPlayerIndex];
slots[fromPlayerIndex]=tmp; slots[fromPlayerIndex]=tmp;
PlayerIndexMessage playerIndexMessage(toPlayerIndex); PlayerIndexMessage playerIndexMessage(toPlayerIndex);
slots[toPlayerIndex]->sendMessage(&playerIndexMessage); slots[toPlayerIndex]->sendMessage(&playerIndexMessage);
result=true; result=true;
updateListen();
} }
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] END\n",__FILE__,__FUNCTION__); SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] END\n",__FILE__,__FUNCTION__);
return result; return result;