(svn r24789) -Add: Separate setting to control the default settings of newly added scripts and random AIs.

This commit is contained in:
frosch
2012-12-05 19:36:04 +00:00
parent e43bf5dabd
commit 812ae4140a
9 changed files with 33 additions and 3 deletions

View File

@@ -293,7 +293,7 @@ int ScriptInfo::GetSettingDefaultValue(const char *name) const
for (ScriptConfigItemList::const_iterator it = this->config_list.begin(); it != this->config_list.end(); it++) {
if (strcmp((*it).name, name) != 0) continue;
/* The default value depends on the difficulty level */
switch (GetGameSettings().difficulty.diff_level) {
switch (GetGameSettings().script.settings_profile) {
case SP_EASY: return (*it).easy_value;
case SP_MEDIUM: return (*it).medium_value;
case SP_HARD: return (*it).hard_value;