22 super.OnTriggerCreated();
32 int nrOfSources = raycast_sources.Count();
33 for (
int v = 0; v < nrOfSources; ++v)
51 super.OnStayFinishServerEvent();
73 for (
int c = 0; c < nrOfCachedResults; ++c )
76 if ( cachedRes.
obj == victim )
77 return victim.GetDamageZoneNameByComponentIndex(cachedRes.
component);
88 params.
type = ObjIntersectIFire;
100 for (
int j = 0; j < victims.Count(); ++j )
104 if (res.
obj == victim)
105 hitzone = victim.GetDamageZoneNameByComponentIndex(res.
component);
107 if (res.
obj.IsAnyInherited(m_DamageableTypes))
111 if ( !( hitzone ==
"") )
123 Error(
string.Format(
"[WARNING] :: [%1] :: [AreaDamageComponentRaycasted] :: No proper HitZone found for damaging %2, using fallback.",
137 victim.GetDamageZones(damageZones);
139 int nrOfDmgZones = damageZones.Count();
141 if (nrOfDmgZones > 0)
143 for (
int z = 0; z < nrOfDmgZones; ++z)
145 if ( damageZones[z].Contains(
"Foot") || damageZones[z].Contains(
"Leg") )
146 return damageZones[z];
149 return damageZones.GetRandomElement();
ref array< typename > m_DamageableTypes void AreaDamageComponent(AreaDamageManager parent)
void AreaDamageManager(EntityAI parent)
void SetRaycastLength(float length)
AreaDamageComponentData GetAreaDamageComponentData(Object object)
override void OnTriggerCreated()
override void OnStayFinishServerEvent()
string GetFallbackHitZone(Object victim)
void SetRaycastSourcesVector(array< vector > raycast_sources)
ref array< vector > m_RaycastSources
void AreaDamageComponentRaycasted(AreaDamageManager parent)
ref array< ref RaycastRVResult > m_RaycastCache
vector m_RaycastEndOffset
void SetRaycastSources(array< string > raycast_sources)
string GetRaycastedHitZone(Object victim)
static proto bool RaycastRVProxy(notnull RaycastRVParams in, out notnull array< ref RaycastRVResult > results, array< Object > excluded=null)
vector endPos
end position of raycast (e.g. player direction)
vector begPos
begin position of raycast (e.g. player position)
Object obj
object,that we collide with (NULL if none), If hierLevel > 0 object is the proxy object
int component
index of component in corresponding geometry level
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
void Error(string err)
Messagebox with error message.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].