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()
256 triggerAreaShapes.Insert(
Debug.DrawBox(min, max));
259 private void Debug_CleanupShapes(array<Shape> shapesArr)
261 for (
int it = 0; it < shapesArr.Count(); ++it )
263 Debug.RemoveShape( shapesArr[it] );
string m_TriggerBaseClass
override void PostDamageActions()
Usually called from AreaDamageComponent.
void AreaDamageManager(EntityAI parent)
AreaDamageTriggerBase m_AreaDamageTrigger
DamageType
exposed from C++ (do not change)
Object m_ParentObject
Cached parent.
void EnableDebug(bool pEnabled)
string GetRaycastedHitZone(Object victim, array< string > raycast_sources_str)
void EvaluateDamage_Loop(Object object)
void OnEnterClient(Object object)
AreaDamageBase m_AreaDamage
void EvaluateDamage_Common(Object object, string hitzone)
void OnLeave(Object object)
void EvaluateDamage_Defer(Object object)
void OnLeaveServer(Object object)
void EvaluateDamage_DeferLoop(Object object)
void AreaDamageBase(EntityAI parent)
void OnLeaveClient(Object object)
void OnEnterServer(Object object)
void EvaluateDamage(Object object)
ref array< string > m_RaycastSources
void OnEnter(Object object)
events
string GetRandomHitZone(array< string > hitzones)
ref array< string > m_HitZones
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.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
static proto int Randomize(int seed)
Sets the seed for the random number generator.
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].