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)
protected Widget m_Parent
Newer implementation equivalent of "AreaDamageRegularRaycasted", hitzone selection only.
ref array< vector > m_RaycastSources
ref array< ref RaycastRVResult > m_RaycastCache
override void OnStayFinishServerEvent()
void AreaDamageComponentRaycasted(AreaDamageManager parent)
protected string GetRaycastedHitZone(Object victim)
protected string GetFallbackHitZone(Object victim)
override void OnTriggerCreated()
override protected AreaDamageComponentData GetAreaDamageComponentData(Object object)
protected void ClearCache()
vector m_RaycastEndOffset
void SetRaycastSources(array< string > raycast_sources)
void SetRaycastLength(float length)
void SetRaycastSourcesVector(array< vector > raycast_sources)
static proto bool RaycastRVProxy(notnull RaycastRVParams in, out notnull array< ref RaycastRVResult > results, array< Object > excluded=null)
vector begPos
begin position of raycast (e.g. player position)
vector endPos
end position of raycast (e.g. player direction)
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].