Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
areadamagetriggerbase.c
Go to the documentation of this file.
3 {
5  float lastDamaged;
6 
8  {
9  }
10 }
11 
14 {
17 
20  {
21  m_AreaDamageManager = null;
22  }
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  void SetAreaDamageManager( AreaDamageManager adType )
41  {
42  m_AreaDamageManager = adType;
43 
44  #ifdef DEVELOPER
45  m_DebugAreaType = m_AreaDamageManager.GetAmmoName();
46  #endif
47  }
49 
50 
52 
53  override protected void OnEnterBeginEvent(TriggerInsider insider)
55  {
56  super.OnEnterBeginEvent(insider);
57 
58  if ( m_AreaDamageManager )
59  m_AreaDamageManager.OnEnterBeginEvent(insider);
60  }
61  override protected void OnEnterServerEvent(TriggerInsider insider)
62  {
63  super.OnEnterServerEvent(insider);
64 
65  if ( m_AreaDamageManager )
66  m_AreaDamageManager.OnEnterServerEvent(insider);
67  }
68  override protected void OnEnterClientEvent(TriggerInsider insider)
69  {
70  super.OnEnterClientEvent(insider);
71 
72  if ( m_AreaDamageManager )
73  m_AreaDamageManager.OnEnterClientEvent(insider);
74  }
75  override protected void OnEnterEndEvent(TriggerInsider insider)
76  {
77  super.OnEnterEndEvent(insider);
78 
79  if ( m_AreaDamageManager )
80  m_AreaDamageManager.OnEnterEndEvent(insider);
81  }
82 
84  override protected void OnStayStartBeginEvent(int nrOfInsiders)
85  {
86  super.OnStayStartBeginEvent(nrOfInsiders);
87 
88  if ( m_AreaDamageManager )
89  m_AreaDamageManager.OnStayStartBeginEvent(nrOfInsiders);
90  }
91  override protected void OnStayStartServerEvent(int nrOfInsiders)
92  {
93  super.OnStayStartServerEvent(nrOfInsiders);
94 
95  if ( m_AreaDamageManager )
96  m_AreaDamageManager.OnStayStartServerEvent(nrOfInsiders);
97  }
98  override protected void OnStayStartClientEvent(int nrOfInsiders)
99  {
100  super.OnStayStartClientEvent(nrOfInsiders);
101 
102  if ( m_AreaDamageManager )
103  m_AreaDamageManager.OnStayStartClientEvent(nrOfInsiders);
104  }
105  override protected void OnStayStartEndEvent(int nrOfInsiders)
106  {
107  super.OnStayStartEndEvent(nrOfInsiders);
108 
109  if ( m_AreaDamageManager )
110  m_AreaDamageManager.OnStayStartEndEvent(nrOfInsiders);
111  }
112 
114  override protected void OnStayBeginEvent(TriggerInsider insider, float deltaTime)
115  {
116  super.OnStayBeginEvent(insider, deltaTime);
117 
118  if ( m_AreaDamageManager )
119  m_AreaDamageManager.OnStayBeginEvent(insider, deltaTime);
120  }
121  override protected void OnStayServerEvent(TriggerInsider insider, float deltaTime)
122  {
123  super.OnStayServerEvent(insider, deltaTime);
124 
125  if ( m_AreaDamageManager )
126  m_AreaDamageManager.OnStayServerEvent(insider, deltaTime);
127  }
128  override protected void OnStayClientEvent(TriggerInsider insider, float deltaTime)
129  {
130  super.OnStayClientEvent(insider, deltaTime);
131 
132  if ( m_AreaDamageManager )
133  m_AreaDamageManager.OnStayClientEvent(insider, deltaTime);
134  }
135  override protected void OnStayEndEvent(TriggerInsider insider, float deltaTime)
136  {
137  super.OnStayEndEvent(insider, deltaTime);
138 
139  if ( m_AreaDamageManager )
140  m_AreaDamageManager.OnStayEndEvent(insider, deltaTime);
141  }
142 
144  override protected void OnStayFinishBeginEvent()
145  {
146  super.OnStayFinishBeginEvent();
147 
148  if ( m_AreaDamageManager )
149  m_AreaDamageManager.OnStayFinishBeginEvent();
150  }
151  override protected void OnStayFinishServerEvent()
152  {
153  super.OnStayFinishServerEvent();
154 
155  if ( m_AreaDamageManager )
156  m_AreaDamageManager.OnStayFinishServerEvent();
157  }
158  override protected void OnStayFinishClientEvent()
159  {
160  super.OnStayFinishClientEvent();
161 
162  if ( m_AreaDamageManager )
163  m_AreaDamageManager.OnStayFinishClientEvent();
164  }
165  override protected void OnStayFinishEndEvent()
166  {
167  super.OnStayFinishEndEvent();
168 
169  if ( m_AreaDamageManager )
170  m_AreaDamageManager.OnStayFinishEndEvent();
171  }
172 
174  override protected void OnLeaveBeginEvent(TriggerInsider insider)
175  {
176  super.OnLeaveBeginEvent(insider);
177 
178  if ( m_AreaDamageManager )
179  m_AreaDamageManager.OnLeaveBeginEvent(insider);
180  }
181  override protected void OnLeaveServerEvent(TriggerInsider insider)
182  {
183  super.OnLeaveServerEvent(insider);
184 
185  if ( m_AreaDamageManager )
186  m_AreaDamageManager.OnLeaveServerEvent(insider);
187  }
188  override protected void OnLeaveClientEvent(TriggerInsider insider)
189  {
190  super.OnLeaveClientEvent(insider);
191 
192  if ( m_AreaDamageManager )
193  m_AreaDamageManager.OnLeaveClientEvent(insider);
194  }
195  override protected void OnLeaveEndEvent(TriggerInsider insider)
196  {
197  super.OnLeaveEndEvent(insider);
198 
199  if ( m_AreaDamageManager )
200  m_AreaDamageManager.OnLeaveEndEvent(insider);
201  }
203 
204 
206 
207  override protected bool ShouldRemoveInsider(TriggerInsider insider)
209  {
210  return !insider.GetObject().IsAlive();
211  }
213 
214 
216 
217  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 }
OnEnterBeginEvent
override protected void OnEnterBeginEvent(TriggerInsider insider)
TriggerEvents, pass them on to manager.
Definition: areadamagetriggerbase.c:54
GetGame
proto native CGame GetGame()
OnStayStartEndEvent
override protected void OnStayStartEndEvent(int nrOfInsiders)
Definition: areadamagetriggerbase.c:105
OnStayStartClientEvent
override protected void OnStayStartClientEvent(int nrOfInsiders)
Definition: areadamagetriggerbase.c:98
OnLeaveServerEvent
override protected void OnLeaveServerEvent(TriggerInsider insider)
Definition: areadamagetriggerbase.c:181
TriggerInsider
The object which is in a trigger and its metadata.
Definition: trigger.c:2
AreaDamageTriggerInsider
Extended TriggerInsider for AreaDamageTriggerBase.
Definition: areadamagetriggerbase.c:2
ShouldRemoveInsider
override protected bool ShouldRemoveInsider(TriggerInsider insider)
TriggerInsider conditions.
Definition: areadamagetriggerbase.c:208
OnStayFinishBeginEvent
override protected void OnStayFinishBeginEvent()
OnStayFinish.
Definition: areadamagetriggerbase.c:144
AreaDamageTriggerBase
Definition: areadamagetriggerdirect.c:1
~AreaDamageTriggerBase
void ~AreaDamageTriggerBase()
dtor
Definition: areadamagetriggerbase.c:25
OnStayStartServerEvent
override protected void OnStayStartServerEvent(int nrOfInsiders)
Definition: areadamagetriggerbase.c:91
OnStayBeginEvent
override protected void OnStayBeginEvent(TriggerInsider insider, float deltaTime)
OnStay.
Definition: areadamagetriggerbase.c:114
OnEnterEndEvent
override protected void OnEnterEndEvent(TriggerInsider insider)
Definition: areadamagetriggerbase.c:75
OnStayEndEvent
override protected void OnStayEndEvent(TriggerInsider insider, float deltaTime)
Definition: areadamagetriggerbase.c:135
AddInsider
override protected void AddInsider(Object obj)
Adding of new TriggerInsider.
Definition: areadamagetriggerbase.c:224
CreateInsider
override protected TriggerInsider CreateInsider(Object obj)
TriggerInsider processing.
Definition: areadamagetriggerbase.c:218
RemoveInsider
override protected void RemoveInsider(TriggerInsider insider, int index=-1)
Removing of TriggerInsider.
Definition: areadamagetriggerbase.c:233
OnStayFinishClientEvent
override protected void OnStayFinishClientEvent()
Definition: areadamagetriggerbase.c:158
Trigger
Scripted Trigger.
Definition: hologram.c:1573
OnStayStartBeginEvent
override protected void OnStayStartBeginEvent(int nrOfInsiders)
OnStayStart.
Definition: areadamagetriggerbase.c:84
AreaDamageTriggerBase
void AreaDamageTriggerBase()
ctor
Definition: areadamagetriggerbase.c:19
Object
Definition: objecttyped.c:1
OnStayClientEvent
override protected void OnStayClientEvent(TriggerInsider insider, float deltaTime)
Definition: areadamagetriggerbase.c:128
OnEnterClientEvent
override protected void OnEnterClientEvent(TriggerInsider insider)
Definition: areadamagetriggerbase.c:68
OnStayFinishServerEvent
override protected void OnStayFinishServerEvent()
Definition: areadamagetriggerbase.c:151
OnEnterServerEvent
override protected void OnEnterServerEvent(TriggerInsider insider)
Definition: areadamagetriggerbase.c:61
OnLeaveBeginEvent
override protected void OnLeaveBeginEvent(TriggerInsider insider)
OnLeave.
Definition: areadamagetriggerbase.c:174
OnLeaveEndEvent
override protected void OnLeaveEndEvent(TriggerInsider insider)
Definition: areadamagetriggerbase.c:195
AreaDamageManager
void AreaDamageManager(EntityAI parent)
Definition: areadamagemanager.c:22
OnStayFinishEndEvent
override protected void OnStayFinishEndEvent()
Definition: areadamagetriggerbase.c:165
m_AreaDamageManager
AreaDamageTriggerInsider m_AreaDamageManager
Managed by AreaDamageManager and its derivatives.
OnLeaveClientEvent
override protected void OnLeaveClientEvent(TriggerInsider insider)
Definition: areadamagetriggerbase.c:188