mirror of
https://github.com/glest/glest-source.git
synced 2025-02-21 09:42:47 +01:00
menu_state_new_game.cpp: remove code that blocks players
(closes #6) This means "InternetGamesGamesAllowed" will not be used. Anyone can enter the lobby even if they can't beat a 1.0 cpu.
This commit is contained in:
parent
d82463f215
commit
e6e7c620a3
@ -106,28 +106,7 @@ void MenuStateNewGame::mouseClick(int x, int y, MouseButton mouseButton){
|
||||
}
|
||||
else if(buttonMasterserverGame.mouseClick(x, y)){
|
||||
soundRenderer.playFx(coreData.getClickSoundB());
|
||||
bool playScenario=false;
|
||||
if (Config::getInstance().getString("InternetGamesBlockScenario", "") != ""
|
||||
&& Config::getInstance().getBool("InternetGamesAllowed", "false") == false) {
|
||||
|
||||
// check if scenario exists;
|
||||
vector<string> dirList=Config::getInstance().getPathListForType(ptScenarios);
|
||||
string scenarioName=Config::getInstance().getString(
|
||||
"InternetGamesBlockScenario");
|
||||
|
||||
string scenarioPath = Scenario::getScenarioPath(dirList, scenarioName);
|
||||
|
||||
if (scenarioPath != "") {
|
||||
mainMenu->setState(
|
||||
new MenuStateScenario(program, mainMenu, false, dirList,
|
||||
scenarioName));
|
||||
playScenario=true;
|
||||
}
|
||||
}
|
||||
|
||||
if(playScenario==false){
|
||||
mainMenu->setState(new MenuStateMasterserver(program, mainMenu));
|
||||
}
|
||||
mainMenu->setState(new MenuStateMasterserver(program, mainMenu));
|
||||
}
|
||||
else if(buttonTutorial.mouseClick(x, y)){
|
||||
soundRenderer.playFx(coreData.getClickSoundB());
|
||||
|
Loading…
x
Reference in New Issue
Block a user