mirror of
https://github.com/glest/glest-source.git
synced 2025-02-25 12:12:25 +01:00
- allow admin user to switch slots when they are in an unassigned slot
This commit is contained in:
parent
27b5d40bf8
commit
6f9f2d8f01
@ -1970,12 +1970,14 @@ 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\n",i,listBoxControls[i].getSelectedItemIndex(),switchSetupRequests[i]->getToFactionIndex(),switchSetupRequests[i]->getCurrentFactionIndex());
|
||||
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());
|
||||
|
||||
if(onlyNetworkUnassigned == true && listBoxControls[i].getSelectedItemIndex() != ctNetworkUnassigned) {
|
||||
continue;
|
||||
if(i < mapInfo.players || (i >= mapInfo.players && listBoxControls[i].getSelectedItemIndex() != ctNetwork)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(listBoxControls[i].getSelectedItemIndex() == ctNetwork || listBoxControls[i].getSelectedItemIndex() == ctNetworkUnassigned) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user