mirror of
https://github.com/glest/glest-source.git
synced 2025-08-30 19:29:47 +02:00
Proof that you are ready for internet games
This commit is contained in:
Submodule data/glest_game updated: c256b69196...b3fab75a92
@@ -73,6 +73,19 @@ BattleEnd::BattleEnd(Program *program, const Stats *stats,ProgramState *originSt
|
||||
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
if(stats->getVictory(stats->getThisFactionIndex())==true){
|
||||
printf("I won\n");
|
||||
if (Config::getInstance().getString("InternetGamesBlockScenario", "") != ""
|
||||
&& Config::getInstance().getBool("InternetGamesAllowed", "false") == false) {
|
||||
printf("won=%s\n",gameSettings->getScenario().c_str());
|
||||
if(Config::getInstance().getString("InternetGamesBlockScenario")==gameSettings->getScenario()){
|
||||
Config::getInstance().setBool("InternetGamesAllowed",true);
|
||||
Config::getInstance().save();
|
||||
printf("give it to me baby!\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
initBackgroundVideo();
|
||||
initBackgroundMusic();
|
||||
|
||||
|
@@ -106,7 +106,17 @@ void MenuStateNewGame::mouseClick(int x, int y, MouseButton mouseButton){
|
||||
}
|
||||
else if(buttonMasterserverGame.mouseClick(x, y)){
|
||||
soundRenderer.playFx(coreData.getClickSoundB());
|
||||
mainMenu->setState(new MenuStateMasterserver(program, mainMenu));
|
||||
if (Config::getInstance().getString("InternetGamesBlockScenario", "") != ""
|
||||
&& Config::getInstance().getBool("InternetGamesAllowed", "false") == false) {
|
||||
mainMenu->setState(
|
||||
new MenuStateScenario(program, mainMenu, false,
|
||||
Config::getInstance().getPathListForType(
|
||||
ptScenarios),
|
||||
Config::getInstance().getString(
|
||||
"InternetGamesBlockScenario")));
|
||||
} else {
|
||||
mainMenu->setState(new MenuStateMasterserver(program, mainMenu));
|
||||
}
|
||||
}
|
||||
else if(buttonTutorial.mouseClick(x, y)){
|
||||
soundRenderer.playFx(coreData.getClickSoundB());
|
||||
|
Reference in New Issue
Block a user