Old revision #pa7nscczm | New revision #pc2vjstnz | ||
---|---|---|---|
2 | { | 2 | { |
3 | if (this->info == NULL) return; | 3 | if (this->info == NULL) return; |
4 | 4 | ||
5 | for (SettingValueList::iterator it = this->settings.begin(); it != this->settings.end(); | 5 | for (SettingValueList::iterator it = this->settings.begin(); it != this->settings.end();) { |
6 | const ScriptConfigItem *config_item = this->info->GetConfigItem((*it).first); | 6 | const ScriptConfigItem *config_item = this->info->GetConfigItem((*it).first); |
7 | assert(config_item != NULL); | 7 | assert(config_item != NULL); |
8 | if (((*config_item).flags & SCRIPTCONFIG_INGAME) == 0) { | 8 | |
9 | bool mask = SCRIPTCONFIG_INGAME; | ||
10 | if (!_settings_client.gui.ai_developer_tools) mask |= SCRIPTCONFIG_DEVELOPER; | ||
11 | |||
12 | if (_game_mode == GM_MENU || ((*config_item).flags & mask) != 0) { | ||
9 | free((*it).first); | 13 | free((*it).first); |
10 | this->settings.erase(it); | 14 | it = this->settings.erase(it); |
15 | } else { | ||
16 | it++; | ||
11 | } | 17 | } |
12 | } | 18 | } |
13 | |||
14 | } | 19 | } |