Loading

Paste #pwcw1hpc4

  1. Index: src/ai/ai_gui.cpp
  2. ===================================================================
  3. --- src/ai/ai_gui.cpp   (revision 27601)
  4. +++ src/ai/ai_gui.cpp   (working copy)
  5. @@ -532,7 +532,10 @@
  6.     {
  7.         if (StrEmpty(str)) return;
  8.         ScriptConfigItemList::const_iterator it = this->ai_config->GetConfigList()->begin();
  9. -       for (int i = 0; i < this->clicked_row; i++) it++;
  10. +       for (int i = 0; i < this->clicked_row; i++) {
  11. +           it++;
  12. +           if (!_settings_client.gui.ai_developer_tools && (it->flags & SCRIPTCONFIG_DEVELOPER) != 0) it++;
  13. +       }
  14.         if (_game_mode == GM_NORMAL && ((this->slot == OWNER_DEITY) || Company::IsValidID(this->slot)) && (it->flags & SCRIPTCONFIG_INGAME) == 0) return;
  15.         int32 value = atoi(str);
  16.         this->ai_config->SetSetting((*it).name, value);
  17. @@ -543,7 +546,10 @@
  18.     {
  19.         assert(this->clicked_dropdown);
  20.         ScriptConfigItemList::const_iterator it = this->ai_config->GetConfigList()->begin();
  21. -       for (int i = 0; i < this->clicked_row; i++) it++;
  22. +       for (int i = 0; i < this->clicked_row; i++) {
  23. +           it++;
  24. +           if (!_settings_client.gui.ai_developer_tools && (it->flags & SCRIPTCONFIG_DEVELOPER) != 0) it++;
  25. +       }
  26.         if (_game_mode == GM_NORMAL && ((this->slot == OWNER_DEITY) || Company::IsValidID(this->slot)) && (it->flags & SCRIPTCONFIG_INGAME) == 0) return;
  27.         this->ai_config->SetSetting((*it).name, index);
  28.         this->SetDirty();

Comments