mirror of
https://github.com/glest/glest-source.git
synced 2025-02-24 19:52:25 +01:00
bugfix for loading default games on headless servers
This commit is contained in:
parent
e69f896c21
commit
f61666d04c
@ -3505,6 +3505,14 @@ GameSettings MenuStateCustomGame::loadGameSettingsFromFile(std::string fileName)
|
||||
|
||||
try {
|
||||
CoreData::getInstance().loadGameSettingsFromFile(fileName, &gameSettings);
|
||||
// correct game settings for headless:
|
||||
if(this->headlessServerMode == true) {
|
||||
for(int i = 0; i < GameConstants::maxPlayers; ++i) {
|
||||
if(gameSettings.getFactionControl(i)== ctHuman){
|
||||
gameSettings.setFactionControl(i,ctNetwork);
|
||||
}
|
||||
}
|
||||
}
|
||||
setupUIFromGameSettings(gameSettings);
|
||||
}
|
||||
catch(const exception &ex) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user