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