4 static const float REACTION_ENEMY_DIST_SQ = 50*50;
5 static const float REACTION_FRIENDLY_DIST_SQ = 12*12;
7 override bool PerformReaction(notnull SCR_AIUtilityComponent utility, notnull
SCR_AIThreatSystem threatSystem, AIDangerEvent dangerEvent)
9 IEntity vehicleObject = dangerEvent.GetVictim();
20 vector vehiclePos = vehicleObject.GetOrigin();
21 vector agentPos = utility.GetOrigin();
22 float distSq = vector.DistanceSq(vehiclePos, agentPos);
24 if (distSq >= REACTION_ENEMY_DIST_SQ)
28 if(agent.IsEnemy(vehicleObject))
31 utility.m_LookAction.LookAt(dangerEvent.GetPosition(), utility.m_LookAction.PRIO_DANGER_EVENT);
37 if (distSq <= REACTION_FRIENDLY_DIST_SQ)
41 utility.AddAction(behavior);