mirror of
https://github.com/glest/glest-source.git
synced 2025-08-31 11:41:46 +02:00
try to fix the headless server show itself connected
This commit is contained in:
@@ -3178,6 +3178,12 @@ void MenuStateCustomGame::loadGameSettings(GameSettings *gameSettings,bool force
|
|||||||
if(ct != ctClosed) {
|
if(ct != ctClosed) {
|
||||||
int slotIndex = factionCount;
|
int slotIndex = factionCount;
|
||||||
|
|
||||||
|
|
||||||
|
if (ct == ctHuman && this->headlessServerMode == true) {
|
||||||
|
// switch slot to network, because no human in headless mode
|
||||||
|
ct = ctNetwork;
|
||||||
|
}
|
||||||
|
|
||||||
gameSettings->setFactionControl(slotIndex, ct);
|
gameSettings->setFactionControl(slotIndex, ct);
|
||||||
if(ct == ctHuman) {
|
if(ct == ctHuman) {
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] i = %d, slotIndex = %d, getHumanPlayerName(i) [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,i,slotIndex,getHumanPlayerName(i).c_str());
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] i = %d, slotIndex = %d, getHumanPlayerName(i) [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,i,slotIndex,getHumanPlayerName(i).c_str());
|
||||||
@@ -3218,7 +3224,6 @@ void MenuStateCustomGame::loadGameSettings(GameSettings *gameSettings,bool force
|
|||||||
gameSettings->setTeam(slotIndex, listBoxTeams[i].getSelectedItemIndex());
|
gameSettings->setTeam(slotIndex, listBoxTeams[i].getSelectedItemIndex());
|
||||||
gameSettings->setStartLocationIndex(slotIndex, i);
|
gameSettings->setStartLocationIndex(slotIndex, i);
|
||||||
|
|
||||||
|
|
||||||
if(listBoxControls[i].getSelectedItemIndex() == ctNetwork || listBoxControls[i].getSelectedItemIndex() == ctNetworkUnassigned) {
|
if(listBoxControls[i].getSelectedItemIndex() == ctNetwork || listBoxControls[i].getSelectedItemIndex() == ctNetworkUnassigned) {
|
||||||
if(serverInterface->getSlot(i) != NULL &&
|
if(serverInterface->getSlot(i) != NULL &&
|
||||||
serverInterface->getSlot(i)->isConnected()) {
|
serverInterface->getSlot(i)->isConnected()) {
|
||||||
|
Reference in New Issue
Block a user