68 {
69 if (
GetGame().IsServer() && victim)
70 {
71 if (!victim.GetAllowDamage())
72 return;
73
75 {
77 Param1<EntityAI> params = new Param1<EntityAI>(victim);
79
80 return;
81 }
82 else
83 {
85 {
86 vector raycastStart = ModelToWorld(raycastSourcePosition);
87 vector raycastEnd = "0 0.5 0" + raycastStart;
88
89 RaycastRVParams rayInput = new RaycastRVParams(raycastStart, raycastEnd, this);
91 rayInput.
type = ObjIntersectFire;
93 array<ref RaycastRVResult> results = new array<ref RaycastRVResult>();
94
95 if (DayZPhysics.RaycastRVProxy(rayInput, results))
96 {
97 foreach (RaycastRVResult result: results)
98 {
99 if (result.obj && !result.obj.IsDamageDestroyed() && !result.obj.IsAnyInherited({ItemBase, Plant}))
100 {
101 OnServerSteppedOn(result.obj, result.obj.GetDamageZoneNameByComponentIndex(result.component));
102 return;
103 }
104 }
105 }
106 }
107
109 }
110 }
111 else if (!
GetGame().IsDedicatedServer())
112 {
113 if (victim)
114 {
115 if (victim.IsInherited(PlayerBase))
116 {
117 victim.SpawnDamageDealtEffect();
118 }
119
121 }
122 }
123 }
const float UPDATE_TIMER_INTERVAL
float radius
radius along the ray tested
void OnServerSteppedOn(Object obj, string damageZone)
static const vector m_RaycastSources[RAYCAST_SOURCES_COUNT]
proto native CGame GetGame()