Merge branch 'develop' of github-softcoder-megaglest:MegaGlest/megaglest-source into develop
This commit is contained in:
commit
ed54dd044a
|
@ -113,7 +113,6 @@ Config::Config() {
|
||||||
fileNameParameter.first = "";
|
fileNameParameter.first = "";
|
||||||
fileNameParameter.second = "";
|
fileNameParameter.second = "";
|
||||||
custom_path_parameter = "";
|
custom_path_parameter = "";
|
||||||
serverTitle = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Config::tryCustomPath(std::pair<ConfigType,ConfigType> &type, std::pair<string,string> &file, string custom_path) {
|
bool Config::tryCustomPath(std::pair<ConfigType,ConfigType> &type, std::pair<string,string> &file, string custom_path) {
|
||||||
|
|
|
@ -52,7 +52,6 @@ private:
|
||||||
std::pair<string,string> fileName;
|
std::pair<string,string> fileName;
|
||||||
std::pair<bool,bool> fileLoaded;
|
std::pair<bool,bool> fileLoaded;
|
||||||
string custom_path_parameter;
|
string custom_path_parameter;
|
||||||
string serverTitle;
|
|
||||||
|
|
||||||
static map<ConfigType,Config> configList;
|
static map<ConfigType,Config> configList;
|
||||||
|
|
||||||
|
@ -119,9 +118,6 @@ public:
|
||||||
|
|
||||||
string toString();
|
string toString();
|
||||||
|
|
||||||
string getServerTitle() {return serverTitle;}
|
|
||||||
void setServerTitle(string name) {serverTitle=name;}
|
|
||||||
|
|
||||||
static string getCustomRuntimeProperty(string key) { return customRuntimeProperties[key]; }
|
static string getCustomRuntimeProperty(string key) { return customRuntimeProperties[key]; }
|
||||||
static void setCustomRuntimeProperty(string key, string value) { customRuntimeProperties[key] = value; }
|
static void setCustomRuntimeProperty(string key, string value) { customRuntimeProperties[key] = value; }
|
||||||
|
|
||||||
|
|
|
@ -4233,7 +4233,7 @@ int glestMain(int argc, char** argv) {
|
||||||
string serverTitle = paramPartTokens[1];
|
string serverTitle = paramPartTokens[1];
|
||||||
printf("Forcing serverTitle[%s]\n",serverTitle.c_str());
|
printf("Forcing serverTitle[%s]\n",serverTitle.c_str());
|
||||||
|
|
||||||
config.setServerTitle(serverTitle);
|
config.setString("ServerTitle",serverTitle,true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf("\nInvalid missing server title specified on commandline [%s] value [%s]\n\n",argv[foundParamIndIndex],(paramPartTokens.size() >= 2 ? paramPartTokens[1].c_str() : NULL));
|
printf("\nInvalid missing server title specified on commandline [%s] value [%s]\n\n",argv[foundParamIndIndex],(paramPartTokens.size() >= 2 ? paramPartTokens[1].c_str() : NULL));
|
||||||
|
|
|
@ -732,8 +732,10 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
||||||
|
|
||||||
string MenuStateCustomGame::createGameName(string controllingPlayer){
|
string MenuStateCustomGame::createGameName(string controllingPlayer){
|
||||||
Config &config = Config::getInstance();
|
Config &config = Config::getInstance();
|
||||||
if(config.getServerTitle()!="" && controllingPlayer == ""){
|
string serverTitle=config.getString("ServerTitle","");
|
||||||
return config.getServerTitle();
|
|
||||||
|
if(serverTitle!="" && controllingPlayer == ""){
|
||||||
|
return serverTitle;
|
||||||
}
|
}
|
||||||
else if (this->headlessServerMode == true) {
|
else if (this->headlessServerMode == true) {
|
||||||
if (controllingPlayer != "") {
|
if (controllingPlayer != "") {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user