121 if (
object &&
object.IsAlive() )
123 if (
object.IsAnyInherited( m_DamageableTypes ) )
159 return hitzones[idx];
171 int contactComponent;
172 bool isSteppedOn =
false;
175 ref set<Object> victims =
new set<Object>;
178 for (
int v = 0; v < raycast_sources_str.Count(); ++v)
180 raycast_sources.Insert(raycast_sources_str[v].ToVector());
183 for (
int i = 0; i < raycast_sources.Count(); ++i )
186 vector raycast_end_pos =
"0 0.5 0" + raycast_start_pos;
191 DayZPhysics.
RaycastRV( raycast_start_pos, raycast_end_pos, contact_pos, contact_dir, contactComponent, victims , null,
m_AreaDamageTrigger,
true,
false, ObjIntersectIFire);
193 for (
int j = 0; j < victims.Count(); ++j )
195 Object contact_obj = victims.Get(j);
197 if ( contact_obj.IsAnyInherited(m_DamageableTypes) )
209 hitzone = eai.GetDamageZoneNameByComponentIndex(contactComponent);
222 string dmg_zone_rnd =
"LeftFoot";
224 dmg_zone_rnd =
"RightFoot";
247 Debug_CleanupShapes(triggerAreaShapes);
251 protected void Debug_DrawArea()
259 private void Debug_CleanupShapes(
array<Shape> shapesArr)
261 for (
int it = 0; it < shapesArr.Count(); ++it )
protected vector m_ExtentMax
protected vector m_AreaPosition
override void PostDamageActions()
Usually called from AreaDamageComponent.
protected AreaDamageTriggerBase m_AreaDamageTrigger
void AreaDamageManager(EntityAI parent)
protected string m_TriggerBaseClass
protected vector m_ExtentMin
protected Object m_ParentObject
Cached parent.
void EnableDebug(bool pEnabled)
protected float m_PlayerDamage
void OnEnter(Object object)
events
protected float m_DeferDuration
protected string GetRandomHitZone(array< string > hitzones)
void OnLeaveServer(Object object)
protected void EvaluateDamage(Object object)
void AreaDamageBase(EntityAI parent)
void OnLeave(Object object)
protected void EvaluateDamage_DeferLoop(Object object)
protected float m_LoopInterval
void OnLeaveClient(Object object)
protected void EvaluateDamage_Loop(Object object)
protected float m_OthersDamage
protected string m_AmmoName
protected ref array< string > m_HitZones
protected string GetRaycastedHitZone(Object victim, array< string > raycast_sources_str)
protected int m_DamageType
void OnEnterClient(Object object)
protected AreaDamageBase m_AreaDamage
protected ref Timer m_DeferTimer
protected ref array< string > m_RaycastSources
protected ref array< typename > m_DamageableTypes protected ref Timer m_LoopTimer
void OnEnterServer(Object object)
protected void EvaluateDamage_Common(Object object, string hitzone)
protected void EvaluateDamage_Defer(Object object)
static proto bool RaycastRV(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, set< Object > results=NULL, Object with=NULL, Object ignore=NULL, bool sorted=false, bool ground_only=false, int iType=ObjIntersectView, float radius=0.0, CollisionFlags flags=CollisionFlags.NEARESTCONTACT)
Raycasts world by given parameters.
static void RemoveShape(out Shape shape)
static Shape DrawBox(vector pos1, vector pos2, int color=0x1fff7f7f)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
static proto int Randomize(int seed)
Sets the seed for the random number generator.
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].