Change AI_scan_area_timer to have a little variability in renewing a new timer time versus deciding one on spawn and sticking with it

This commit is contained in:
Akkadius 2015-11-02 23:23:04 -06:00
parent 67c7254fd1
commit 27c8a85f61

View File

@ -1364,9 +1364,14 @@ void Mob::AI_Process() {
*
*/
Mob* tmptar = entity_list.AICheckCloseAggro(this, GetAggroRange(), GetAssistRange());
if (tmptar)
AddToHateList(tmptar);
Mob* temp_target = entity_list.AICheckCloseAggro(this, GetAggroRange(), GetAssistRange());
if (temp_target){
AddToHateList(temp_target);
}
AI_scan_area_timer->Disable();
AI_scan_area_timer->Start(RandomTimer(RuleI(NPC, NPCToNPCAggroTimerMin), RuleI(NPC, NPCToNPCAggroTimerMax)), false);
}
else if (AI_movement_timer->Check() && !IsRooted())
{