- validation so admin client connected to headless server cannot change his 'control type' because this would invalidate his connection.

This commit is contained in:
Mark Vejvoda 2011-09-28 15:51:13 +00:00
parent 54167054a1
commit b57fb0ff39
1 changed files with 8 additions and 1 deletions

View File

@ -1191,9 +1191,16 @@ void MenuStateConnectedGame::mouseClickAdmin(int x, int y, MouseButton mouseButt
//}
//ensure thet only 1 human player is present
if(listBoxControls[i].mouseClick(x, y)) {
int oldSelectedIndex = listBoxControls[i].getSelectedItemIndex();
if(clientInterface != NULL && clientInterface->getGameSettings() != NULL &&
clientInterface->getGameSettings()->getThisFactionIndex() != i &&
listBoxControls[i].mouseClick(x, y)) {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__);
if(listBoxControls[i].getSelectedItemIndex() == ctNetworkUnassigned) {
listBoxControls[i].mouseClick(x, y);
}
//look for human players
// int humanIndex1= -1;
// int humanIndex2= -1;