mirror of
https://github.com/glest/glest-source.git
synced 2025-09-29 00:48:58 +02:00
Added code for the following:
a) Complete Unit Rotation for multi-player b) Added support for user defined data folders
This commit is contained in:
@@ -137,6 +137,7 @@ const string Properties::getString(const string &key, const char *defaultValueIf
|
||||
it= propertyMap.find(key);
|
||||
if(it==propertyMap.end()){
|
||||
if(defaultValueIfNotFound != NULL) {
|
||||
//printf("In [%s::%s - %d]defaultValueIfNotFound = [%s]\n",__FILE__,__FUNCTION__,__LINE__,defaultValueIfNotFound);
|
||||
return string(defaultValueIfNotFound);
|
||||
}
|
||||
else {
|
||||
@@ -144,7 +145,7 @@ const string Properties::getString(const string &key, const char *defaultValueIf
|
||||
}
|
||||
}
|
||||
else{
|
||||
return it->second;
|
||||
return (it->second != "" ? it->second : (defaultValueIfNotFound != NULL ? defaultValueIfNotFound : it->second));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,6 +210,7 @@ const string Properties::getString(const char *key, const char *defaultValueIfNo
|
||||
it= propertyMap.find(key);
|
||||
if(it==propertyMap.end()){
|
||||
if(defaultValueIfNotFound != NULL) {
|
||||
//printf("In [%s::%s - %d]defaultValueIfNotFound = [%s]\n",__FILE__,__FUNCTION__,__LINE__,defaultValueIfNotFound);
|
||||
return string(defaultValueIfNotFound);
|
||||
}
|
||||
else {
|
||||
@@ -216,7 +218,7 @@ const string Properties::getString(const char *key, const char *defaultValueIfNo
|
||||
}
|
||||
}
|
||||
else{
|
||||
return it->second;
|
||||
return (it->second != "" ? it->second : (defaultValueIfNotFound != NULL ? defaultValueIfNotFound : it->second));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user