| Old revision #pwzj5uvjx | New revision #p3c6qc5ys | ||
|---|---|---|---|
| 4 | const ScriptConfigItem *config_item = this->info->GetConfigItem((*it).first); | 4 | const ScriptConfigItem *config_item = this->info->GetConfigItem((*it).first); |
| 5 | assert(config_item != NULL); | 5 | assert(config_item != NULL); |
| 6 | 6 | ||
| 7 | bool erase = false; | 7 | bool editable = _game_mode == GM_MENU || ((*config_item).flags & SCRIPTCONFIG_INGAME) != 0; |
| 8 | if (_game_mode == GM_MENU || ((*config_item).flags & SCRIPTCONFIG_INGAME) != 0) { | 8 | bool visible = !(!_settings_client.gui.ai_developer_tools && ((*config_item).flags & SCRIPTCONFIG_DEVELOPER) != 0); |
| 9 | erase = true; | ||
| 10 | } | ||
| 11 | 9 | ||
| 12 | if (!_settings_client.gui.ai_developer_tools && ((*config_item).flags & SCRIPTCONFIG_DEVELOPER) != 0) { | 12 | if (editable && visible) { |
| 13 | erase = false; | ||
| 14 | } | ||
| 15 | |||
| 16 | if (erase) { | ||
| 17 | free((*it).first); | 11 | free((*it).first); |
| 18 | it = this->settings.erase(it); | 12 | it = this->settings.erase(it); |
| 19 | } else { | 13 | } else { |