DayZ 1.24
Loading...
Searching...
No Matches
AreaDamageTriggerBase.c
Go to the documentation of this file.
1
11
14{
16 protected ref AreaDamageManager m_AreaDamageManager;
17
23
26 {
28 int nr = m_insiders.Count();
29 for (int n = 0; n < nr; ++n)
30 {
31 Object insObj = m_insiders[n].GetObject();
32 if (insObj)
33 Leave(m_insiders[n]);
34 }
35 }
36
38
39
40 void SetAreaDamageManager(AreaDamageManager adType)
41 {
43
44#ifdef DEVELOPER
46#endif
47 }
49
50
52
53
54 override protected void OnEnterBeginEvent(TriggerInsider insider)
55 {
56 super.OnEnterBeginEvent(insider);
57
59 m_AreaDamageManager.OnEnterBeginEvent(insider);
60 }
61 override protected void OnEnterServerEvent(TriggerInsider insider)
62 {
63 super.OnEnterServerEvent(insider);
64
66 m_AreaDamageManager.OnEnterServerEvent(insider);
67 }
68 override protected void OnEnterClientEvent(TriggerInsider insider)
69 {
70 super.OnEnterClientEvent(insider);
71
73 m_AreaDamageManager.OnEnterClientEvent(insider);
74 }
75 override protected void OnEnterEndEvent(TriggerInsider insider)
76 {
77 super.OnEnterEndEvent(insider);
78
80 m_AreaDamageManager.OnEnterEndEvent(insider);
81 }
82
84 override protected void OnStayStartBeginEvent(int nrOfInsiders)
85 {
86 super.OnStayStartBeginEvent(nrOfInsiders);
87
89 m_AreaDamageManager.OnStayStartBeginEvent(nrOfInsiders);
90 }
91 override protected void OnStayStartServerEvent(int nrOfInsiders)
92 {
93 super.OnStayStartServerEvent(nrOfInsiders);
94
96 m_AreaDamageManager.OnStayStartServerEvent(nrOfInsiders);
97 }
98 override protected void OnStayStartClientEvent(int nrOfInsiders)
99 {
100 super.OnStayStartClientEvent(nrOfInsiders);
101
103 m_AreaDamageManager.OnStayStartClientEvent(nrOfInsiders);
104 }
105 override protected void OnStayStartEndEvent(int nrOfInsiders)
106 {
107 super.OnStayStartEndEvent(nrOfInsiders);
108
110 m_AreaDamageManager.OnStayStartEndEvent(nrOfInsiders);
111 }
112
114 override protected void OnStayBeginEvent(TriggerInsider insider, float deltaTime)
115 {
116 super.OnStayBeginEvent(insider, deltaTime);
117
119 m_AreaDamageManager.OnStayBeginEvent(insider, deltaTime);
120 }
121 override protected void OnStayServerEvent(TriggerInsider insider, float deltaTime)
122 {
123 super.OnStayServerEvent(insider, deltaTime);
124
126 m_AreaDamageManager.OnStayServerEvent(insider, deltaTime);
127 }
128 override protected void OnStayClientEvent(TriggerInsider insider, float deltaTime)
129 {
130 super.OnStayClientEvent(insider, deltaTime);
131
133 m_AreaDamageManager.OnStayClientEvent(insider, deltaTime);
134 }
135 override protected void OnStayEndEvent(TriggerInsider insider, float deltaTime)
136 {
137 super.OnStayEndEvent(insider, deltaTime);
138
140 m_AreaDamageManager.OnStayEndEvent(insider, deltaTime);
141 }
142
144 override protected void OnStayFinishBeginEvent()
145 {
146 super.OnStayFinishBeginEvent();
147
149 m_AreaDamageManager.OnStayFinishBeginEvent();
150 }
151 override protected void OnStayFinishServerEvent()
152 {
153 super.OnStayFinishServerEvent();
154
156 m_AreaDamageManager.OnStayFinishServerEvent();
157 }
158 override protected void OnStayFinishClientEvent()
159 {
160 super.OnStayFinishClientEvent();
161
163 m_AreaDamageManager.OnStayFinishClientEvent();
164 }
165 override protected void OnStayFinishEndEvent()
166 {
167 super.OnStayFinishEndEvent();
168
170 m_AreaDamageManager.OnStayFinishEndEvent();
171 }
172
174 override protected void OnLeaveBeginEvent(TriggerInsider insider)
175 {
176 super.OnLeaveBeginEvent(insider);
177
179 m_AreaDamageManager.OnLeaveBeginEvent(insider);
180 }
181 override protected void OnLeaveServerEvent(TriggerInsider insider)
182 {
183 super.OnLeaveServerEvent(insider);
184
186 m_AreaDamageManager.OnLeaveServerEvent(insider);
187 }
188 override protected void OnLeaveClientEvent(TriggerInsider insider)
189 {
190 super.OnLeaveClientEvent(insider);
191
193 m_AreaDamageManager.OnLeaveClientEvent(insider);
194 }
195 override protected void OnLeaveEndEvent(TriggerInsider insider)
196 {
197 super.OnLeaveEndEvent(insider);
198
200 m_AreaDamageManager.OnLeaveEndEvent(insider);
201 }
203
204
206
207
208 override protected bool ShouldRemoveInsider(TriggerInsider insider)
209 {
210 return !insider.GetObject().IsAlive();
211 }
213
214
216
217
218 override protected TriggerInsider CreateInsider(Object obj)
219 {
220 return new AreaDamageTriggerInsider(obj);
221 }
222
224 override protected void AddInsider(Object obj)
225 {
226 if (!GetGame().IsServer())
227 return;
228
229 super.AddInsider(obj);
230 }
231
233 override protected void RemoveInsider(TriggerInsider insider, int index = -1)
234 {
235 if (!GetGame().IsServer())
236 return;
237
238 super.RemoveInsider(insider, index);
239 }
240
242 override protected void UpdateInsiders(int timeout)
243 {
244 if (!GetGame().IsServer())
245 return;
246
247 super.UpdateInsiders(timeout);
248 }
250}
override void OnStayStartBeginEvent(int nrOfInsiders)
Called at the beginning of an update loop.
override void OnStayClientEvent(TriggerInsider insider, float deltaTime)
override void OnLeaveEndEvent(TriggerInsider insider)
override void OnLeaveBeginEvent(TriggerInsider insider)
Called when an object leaves the trigger.
override void OnStayStartServerEvent(int nrOfInsiders)
override void OnStayFinishServerEvent()
override void OnEnterEndEvent(TriggerInsider insider)
override void OnStayStartEndEvent(int nrOfInsiders)
override void OnStayFinishEndEvent()
override void OnLeaveClientEvent(TriggerInsider insider)
override void OnStayFinishClientEvent()
override void OnStayStartClientEvent(int nrOfInsiders)
override void OnStayEndEvent(TriggerInsider insider, float deltaTime)
override void OnStayFinishBeginEvent()
Called at the end of an update loop.
override void OnStayBeginEvent(TriggerInsider insider, float deltaTime)
Called in the update loop.
override void OnLeaveServerEvent(TriggerInsider insider)
override void OnEnterBeginEvent(TriggerInsider insider)
Called when an object enters the trigger.
override void OnEnterServerEvent(TriggerInsider insider)
override void OnEnterClientEvent(TriggerInsider insider)
void RemoveInsider(TriggerInsider insider, int index=-1)
Removing of TriggerInsider.
void AreaDamageTriggerBase()
ctor
AreaDamageTriggerInsider m_AreaDamageManager
Managed by AreaDamageManager and its derivatives.
bool ShouldRemoveInsider(TriggerInsider insider)
TriggerInsider conditions.
void AddInsider(Object obj)
Adding of new TriggerInsider.
TriggerInsider CreateInsider(Object obj)
TriggerInsider processing.
void ~AreaDamageTriggerBase()
dtor
override void SetAreaDamageManager(AreaDamageManager adType)
void UpdateInsiders(int timeout)
override void OnStayServerEvent(TriggerInsider insider, float deltaTime)
Extended TriggerInsider for AreaDamageTriggerBase.
float lastDamaged
Last time the object was damaged in seconds.
void AreaDamageTriggerInsider(Object obj)
Scripted Trigger.
Definition Hologram.c:1518
The object which is in a trigger and its metadata.
Definition Trigger.c:3
Object GetObject()
Definition Trigger.c:28
proto native CGame GetGame()