Loading

Paste #phnzkfdkd

  1. void AIConfig::AddRandomDeviation()
  2. {
  3.     ScriptConfigItemList::const_iterator it = NULL;
  4.     for (it = this->GetConfigList()->begin(); it != this->GetConfigList()->end(); it++) {
  5.         /* start_date = 0 is a special case, where random deviation does not occur. */
  6.         if ((*it).random_deviation != 0 && StrEmpty((*it).description) && strcmp((*it).name, "start_date") == 0 && this->GetSetting((*it).name) == 0) {
  7.             break;
  8.         }
  9.     }
  10.  
  11.     ScriptConfig::AddRandomDeviation();
  12.     this->SetSetting((*it).name, InteractiveRandomRange((*it).random_deviation * 2) - (*it).random_deviation + this->GetSetting((*it).name));
  13. }

Version history

Revision # Author Created at
pqyqwtopp Anonymous 31 Jan 2019, 16:43:05 UTC Diff
p6opfmlwu Anonymous 31 Jan 2019, 15:41:00 UTC Diff

Comments