diff --git a/source/glest_game/facilities/logger.cpp b/source/glest_game/facilities/logger.cpp index 8fd17370..ec146b51 100644 --- a/source/glest_game/facilities/logger.cpp +++ b/source/glest_game/facilities/logger.cpp @@ -37,6 +37,7 @@ const int Logger::logLineCount= 15; // ===================== PUBLIC ======================== Logger::Logger() { + masterserverMode = false; string logs_path = getGameReadWritePath(GameConstants::path_logs_CacheLookupKey); if(logs_path != "") { fileName= logs_path + "log.txt"; @@ -76,7 +77,7 @@ void Logger::add(const string str, bool renderScreen, const string statusText) this->current= str; this->statusText = statusText; - if(renderScreen == true) { + if(renderScreen == true && masterserverMode == false) { renderLoadingScreen(); } } diff --git a/source/glest_game/facilities/logger.h b/source/glest_game/facilities/logger.h index ca685890..a167b539 100644 --- a/source/glest_game/facilities/logger.h +++ b/source/glest_game/facilities/logger.h @@ -51,6 +51,8 @@ private: bool cancelSelected; GraphicButton buttonCancel; + bool masterserverMode; + private: Logger(); ~Logger(); @@ -58,6 +60,8 @@ private: public: static Logger & getInstance(); + void setMasterserverMode(bool value) { masterserverMode = value; } + void setFile(const string &fileName) {this->fileName= fileName;} void setState(const string &state) {this->state= state;} void setSubtitle(const string &subtitle) {this->subtitle= subtitle;} diff --git a/source/glest_game/main/main.cpp b/source/glest_game/main/main.cpp index 29f203a2..5e220d4a 100644 --- a/source/glest_game/main/main.cpp +++ b/source/glest_game/main/main.cpp @@ -1012,7 +1012,7 @@ void printParameterHelp(const char *argv0, bool foundInvalidArgs) { printf("\n%s\t\tAutomatically starts a game with the last game settings you played.",GAME_ARGS[GAME_ARG_AUTOSTART_LASTGAME]); printf("\n%s=x\t\t\tAuto connects to a network server at IP or hostname x",GAME_ARGS[GAME_ARG_CLIENT]); printf("\n%s\t\t\tAuto creates a network server.",GAME_ARGS[GAME_ARG_SERVER]); - printf("\n%s\t\t\tRuns as a masterserver.",GAME_ARGS[GAME_ARG_MASTERSERVER_MODE]); + printf("\n%s\t\t\tRun as a headless server.",GAME_ARGS[GAME_ARG_MASTERSERVER_MODE]); printf("\n%s=x\t\tAuto loads the specified scenario by scenario name.",GAME_ARGS[GAME_ARG_LOADSCENARIO]); printf("\n%s=x\t\tAuto Preview the specified map by map name.",GAME_ARGS[GAME_ARG_PREVIEW_MAP]); printf("\n%s\t\t\tdisplays the version string of this program.",GAME_ARGS[GAME_ARG_VERSION]); @@ -2529,8 +2529,12 @@ int glestMain(int argc, char** argv) { } createDirectoryPaths(tempDataPath); - if(hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_DISABLE_SOUND]) == true) { + if( hasCommandArgument(argc, argv,GAME_ARGS[GAME_ARG_DISABLE_SOUND]) == true || + hasCommandArgument(argc, argv,string(GAME_ARGS[GAME_ARG_MASTERSERVER_MODE])) == true) { config.setString("FactorySound","None"); + if(hasCommandArgument(argc, argv,string(GAME_ARGS[GAME_ARG_MASTERSERVER_MODE])) == true) { + Logger::getInstance().setMasterserverMode(true); + } } bool enableATIHacks = config.getBool("EnableATIHacks","false"); diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index 9a5b689c..53554163 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -1389,8 +1389,8 @@ void MenuStateCustomGame::mouseMove(int x, int y, const MouseState *ms){ } bool MenuStateCustomGame::isMasterserverMode() const { - //return (this->masterserverMode == true && this->masterserverModeMinimalResources == true); - return false; + return (this->masterserverMode == true && this->masterserverModeMinimalResources == true); + //return false; } void MenuStateCustomGame::render() {