DayZ 1.24
Loading...
Searching...
No Matches
AreaDamageTriggerBase.c File Reference

Go to the source code of this file.

Classes

class  AreaDamageTriggerInsider
 Extended TriggerInsider for AreaDamageTriggerBase. More...
 

Functions

void AreaDamageTriggerBase ()
 ctor
 
void ~AreaDamageTriggerBase ()
 dtor
 
void SetAreaDamageManager (AreaDamageManager adType)
 AreaDamageTriggerBase configuration.
 
void OnEnterBeginEvent (TriggerInsider insider)
 TriggerEvents, pass them on to manager.
 
void OnEnterServerEvent (TriggerInsider insider)
 
void OnEnterClientEvent (TriggerInsider insider)
 
void OnEnterEndEvent (TriggerInsider insider)
 
void OnStayStartBeginEvent (int nrOfInsiders)
 OnStayStart.
 
void OnStayStartServerEvent (int nrOfInsiders)
 
void OnStayStartClientEvent (int nrOfInsiders)
 
void OnStayStartEndEvent (int nrOfInsiders)
 
void OnStayBeginEvent (TriggerInsider insider, float deltaTime)
 OnStay.
 
void OnStayServerEvent (TriggerInsider insider, float deltaTime)
 
void OnStayClientEvent (TriggerInsider insider, float deltaTime)
 
void OnStayEndEvent (TriggerInsider insider, float deltaTime)
 
void OnStayFinishBeginEvent ()
 OnStayFinish.
 
void OnStayFinishServerEvent ()
 
void OnStayFinishClientEvent ()
 
void OnStayFinishEndEvent ()
 
void OnLeaveBeginEvent (TriggerInsider insider)
 OnLeave.
 
void OnLeaveServerEvent (TriggerInsider insider)
 
void OnLeaveClientEvent (TriggerInsider insider)
 
void OnLeaveEndEvent (TriggerInsider insider)
 
bool ShouldRemoveInsider (TriggerInsider insider)
 TriggerInsider conditions.
 
TriggerInsider CreateInsider (Object obj)
 TriggerInsider processing.
 
void AddInsider (Object obj)
 Adding of new TriggerInsider.
 
void RemoveInsider (TriggerInsider insider, int index=-1)
 Removing of TriggerInsider.
 
void UpdateInsiders (int timeout)
 Update the current TriggerInsider inside the Trigger.
 

Variables

AreaDamageTriggerInsider m_AreaDamageManager
 Managed by AreaDamageManager and its derivatives.
 

Function Documentation

◆ AddInsider()

void AddInsider ( Object obj)
protected

Adding of new TriggerInsider.

Definition at line 224 of file AreaDamageTriggerBase.c.

225 {
226 if (!GetGame().IsServer())
227 return;
228
229 super.AddInsider(obj);
230 }
proto native CGame GetGame()

References GetGame().

Referenced by AreaDamageTriggerBase::EOnTouch().

◆ AreaDamageTriggerBase()

void AreaDamageTriggerBase ( )

ctor

Definition at line 19 of file AreaDamageTriggerBase.c.

20 {
22 }
AreaDamageTriggerInsider m_AreaDamageManager
Managed by AreaDamageManager and its derivatives.

References m_AreaDamageManager.

◆ CreateInsider()

TriggerInsider CreateInsider ( Object obj)
protected

TriggerInsider processing.

Override the TriggerInsider type to be AreaDamageTriggerInsider

Definition at line 218 of file AreaDamageTriggerBase.c.

219 {
220 return new AreaDamageTriggerInsider(obj);
221 }
Extended TriggerInsider for AreaDamageTriggerBase.

◆ OnEnterBeginEvent()

void OnEnterBeginEvent ( TriggerInsider insider)
protected

TriggerEvents, pass them on to manager.

OnEnter

Definition at line 54 of file AreaDamageTriggerBase.c.

55 {
56 super.OnEnterBeginEvent(insider);
57
59 m_AreaDamageManager.OnEnterBeginEvent(insider);
60 }

References m_AreaDamageManager.

◆ OnEnterClientEvent()

void OnEnterClientEvent ( TriggerInsider insider)
protected

Definition at line 68 of file AreaDamageTriggerBase.c.

69 {
70 super.OnEnterClientEvent(insider);
71
73 m_AreaDamageManager.OnEnterClientEvent(insider);
74 }

References m_AreaDamageManager.

◆ OnEnterEndEvent()

void OnEnterEndEvent ( TriggerInsider insider)
protected

Definition at line 75 of file AreaDamageTriggerBase.c.

76 {
77 super.OnEnterEndEvent(insider);
78
80 m_AreaDamageManager.OnEnterEndEvent(insider);
81 }

References m_AreaDamageManager.

◆ OnEnterServerEvent()

void OnEnterServerEvent ( TriggerInsider insider)
protected

Definition at line 61 of file AreaDamageTriggerBase.c.

62 {
63 super.OnEnterServerEvent(insider);
64
66 m_AreaDamageManager.OnEnterServerEvent(insider);
67 }

References m_AreaDamageManager.

◆ OnLeaveBeginEvent()

void OnLeaveBeginEvent ( TriggerInsider insider)
protected

OnLeave.

Definition at line 174 of file AreaDamageTriggerBase.c.

175 {
176 super.OnLeaveBeginEvent(insider);
177
179 m_AreaDamageManager.OnLeaveBeginEvent(insider);
180 }

References m_AreaDamageManager.

◆ OnLeaveClientEvent()

void OnLeaveClientEvent ( TriggerInsider insider)
protected

Definition at line 188 of file AreaDamageTriggerBase.c.

189 {
190 super.OnLeaveClientEvent(insider);
191
193 m_AreaDamageManager.OnLeaveClientEvent(insider);
194 }

References m_AreaDamageManager.

◆ OnLeaveEndEvent()

void OnLeaveEndEvent ( TriggerInsider insider)
protected

Definition at line 195 of file AreaDamageTriggerBase.c.

196 {
197 super.OnLeaveEndEvent(insider);
198
200 m_AreaDamageManager.OnLeaveEndEvent(insider);
201 }

References m_AreaDamageManager.

◆ OnLeaveServerEvent()

void OnLeaveServerEvent ( TriggerInsider insider)
protected

Definition at line 181 of file AreaDamageTriggerBase.c.

182 {
183 super.OnLeaveServerEvent(insider);
184
186 m_AreaDamageManager.OnLeaveServerEvent(insider);
187 }

References m_AreaDamageManager.

◆ OnStayBeginEvent()

void OnStayBeginEvent ( TriggerInsider insider,
float deltaTime )
protected

OnStay.

Definition at line 114 of file AreaDamageTriggerBase.c.

115 {
116 super.OnStayBeginEvent(insider, deltaTime);
117
119 m_AreaDamageManager.OnStayBeginEvent(insider, deltaTime);
120 }

References m_AreaDamageManager.

◆ OnStayClientEvent()

void OnStayClientEvent ( TriggerInsider insider,
float deltaTime )
protected

Definition at line 128 of file AreaDamageTriggerBase.c.

129 {
130 super.OnStayClientEvent(insider, deltaTime);
131
133 m_AreaDamageManager.OnStayClientEvent(insider, deltaTime);
134 }

References m_AreaDamageManager.

◆ OnStayEndEvent()

void OnStayEndEvent ( TriggerInsider insider,
float deltaTime )
protected

Definition at line 135 of file AreaDamageTriggerBase.c.

136 {
137 super.OnStayEndEvent(insider, deltaTime);
138
140 m_AreaDamageManager.OnStayEndEvent(insider, deltaTime);
141 }

References m_AreaDamageManager.

◆ OnStayFinishBeginEvent()

void OnStayFinishBeginEvent ( )
protected

OnStayFinish.

Definition at line 144 of file AreaDamageTriggerBase.c.

145 {
146 super.OnStayFinishBeginEvent();
147
149 m_AreaDamageManager.OnStayFinishBeginEvent();
150 }

References m_AreaDamageManager.

◆ OnStayFinishClientEvent()

void OnStayFinishClientEvent ( )
protected

Definition at line 158 of file AreaDamageTriggerBase.c.

159 {
160 super.OnStayFinishClientEvent();
161
163 m_AreaDamageManager.OnStayFinishClientEvent();
164 }

References m_AreaDamageManager.

◆ OnStayFinishEndEvent()

void OnStayFinishEndEvent ( )
protected

Definition at line 165 of file AreaDamageTriggerBase.c.

166 {
167 super.OnStayFinishEndEvent();
168
170 m_AreaDamageManager.OnStayFinishEndEvent();
171 }

References m_AreaDamageManager.

◆ OnStayFinishServerEvent()

void OnStayFinishServerEvent ( )
protected

Definition at line 151 of file AreaDamageTriggerBase.c.

152 {
153 super.OnStayFinishServerEvent();
154
156 m_AreaDamageManager.OnStayFinishServerEvent();
157 }

References m_AreaDamageManager.

◆ OnStayServerEvent()

void OnStayServerEvent ( TriggerInsider insider,
float deltaTime )
protected

Definition at line 121 of file AreaDamageTriggerBase.c.

122 {
123 super.OnStayServerEvent(insider, deltaTime);
124
126 m_AreaDamageManager.OnStayServerEvent(insider, deltaTime);
127 }

References m_AreaDamageManager.

◆ OnStayStartBeginEvent()

void OnStayStartBeginEvent ( int nrOfInsiders)
protected

OnStayStart.

Definition at line 84 of file AreaDamageTriggerBase.c.

85 {
86 super.OnStayStartBeginEvent(nrOfInsiders);
87
89 m_AreaDamageManager.OnStayStartBeginEvent(nrOfInsiders);
90 }

References m_AreaDamageManager.

◆ OnStayStartClientEvent()

void OnStayStartClientEvent ( int nrOfInsiders)
protected

Definition at line 98 of file AreaDamageTriggerBase.c.

99 {
100 super.OnStayStartClientEvent(nrOfInsiders);
101
103 m_AreaDamageManager.OnStayStartClientEvent(nrOfInsiders);
104 }

References m_AreaDamageManager.

◆ OnStayStartEndEvent()

void OnStayStartEndEvent ( int nrOfInsiders)
protected

Definition at line 105 of file AreaDamageTriggerBase.c.

106 {
107 super.OnStayStartEndEvent(nrOfInsiders);
108
110 m_AreaDamageManager.OnStayStartEndEvent(nrOfInsiders);
111 }

References m_AreaDamageManager.

◆ OnStayStartServerEvent()

void OnStayStartServerEvent ( int nrOfInsiders)
protected

Definition at line 91 of file AreaDamageTriggerBase.c.

92 {
93 super.OnStayStartServerEvent(nrOfInsiders);
94
96 m_AreaDamageManager.OnStayStartServerEvent(nrOfInsiders);
97 }

References m_AreaDamageManager.

◆ RemoveInsider()

void RemoveInsider ( TriggerInsider insider,
int index = -1 )
protected

Removing of TriggerInsider.

Definition at line 233 of file AreaDamageTriggerBase.c.

234 {
235 if (!GetGame().IsServer())
236 return;
237
238 super.RemoveInsider(insider, index);
239 }

References GetGame().

◆ SetAreaDamageManager()

void SetAreaDamageManager ( AreaDamageManager adType)

AreaDamageTriggerBase configuration.

Set the manager instance

Definition at line 40 of file AreaDamageTriggerBase.c.

41 {
43
44#ifdef DEVELOPER
46#endif
47 }

References m_AreaDamageManager.

◆ ShouldRemoveInsider()

bool ShouldRemoveInsider ( TriggerInsider insider)
protected

TriggerInsider conditions.

Condition whether a TriggerInsider should still be updated or not (checked in update loop and before adding)

Definition at line 208 of file AreaDamageTriggerBase.c.

209 {
210 return !insider.GetObject().IsAlive();
211 }
Object GetObject()
Definition Trigger.c:28

References TriggerInsider::GetObject().

◆ UpdateInsiders()

void UpdateInsiders ( int timeout)
protected

Update the current TriggerInsider inside the Trigger.

Definition at line 242 of file AreaDamageTriggerBase.c.

243 {
244 if (!GetGame().IsServer())
245 return;
246
247 super.UpdateInsiders(timeout);
248 }

References GetGame().

◆ ~AreaDamageTriggerBase()

dtor

call Leave for all insiders when removing trigger

Definition at line 25 of file AreaDamageTriggerBase.c.

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 }

Variable Documentation

◆ m_AreaDamageManager