Loading

Paste #pc2vjstnz

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

Version history

Revision # Author Created at
pa7nscczm Anonymous 26 Jan 2019, 22:20:50 UTC Diff

Comments