Loading

Paste #p3c6qc5ys

  1. void ScriptConfig::ResetChangeableSettings()
  2. {
  3.     for (SettingValueList::iterator it = this->settings.begin(); it != this->settings.end();) {
  4.         const ScriptConfigItem *config_item = this->info->GetConfigItem((*it).first);
  5.         assert(config_item != NULL);
  6.  
  7.         bool editable = _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.  
  10.         if (editable && visible) {
  11.             free((*it).first);
  12.             it = this->settings.erase(it);
  13.         } else {
  14.             it++;
  15.         }
  16.     }
  17. }

Version history

Revision # Author Created at
pwzj5uvjx Anonymous 27 Jan 2019, 01:12:09 UTC Diff
pc2vjstnz Anonymous 27 Jan 2019, 00:12:00 UTC Diff
pa7nscczm Anonymous 26 Jan 2019, 22:20:50 UTC Diff

Comments