Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
areadamageonce.c
Go to the documentation of this file.
1
class
AreaDamageOnce
:
AreaDamageManager
2
{
3
override
void
OnEnterServerEvent(
TriggerInsider
insider)
4
{
5
super.OnEnterServerEvent(insider);
6
7
OnEvaluateDamageEx
(insider, 1);
8
}
9
}
10
11
class
AreaDamageOnceDeferred :
AreaDamageOnce
12
{
14
protected
float
m_DeferDuration
= 1.0;
15
16
override
void
SetDeferDuration
(
float
time)
17
{
18
m_DeferDuration
= time;
19
}
20
21
override
void
OnStayServerEvent
(
TriggerInsider
insider,
float
deltaTime)
22
{
23
super.OnStayServerEvent(insider, deltaTime);
24
25
AreaDamageTriggerInsider
dInsider;
26
if
( CastTo( dInsider, insider ) && dInsider.lastDamaged == 0 )
27
OnEvaluateDamageEx
(insider, 1);
28
}
29
30
override
protected
float
CalculateDamageScale
(
TriggerInsider
insider,
float
deltaTime)
31
{
32
if
(
m_DeferDuration
> 0 && (insider.lastUpdated - insider.timeEntered) >=
m_DeferDuration
)
33
return
super.CalculateDamageScale(insider, deltaTime);
34
35
return
0;
36
}
37
}
TriggerInsider
The object which is in a trigger and its metadata.
Definition:
trigger.c:2
AreaDamageTriggerInsider
Extended TriggerInsider for AreaDamageTriggerBase.
Definition:
areadamagetriggerbase.c:2
OnStayServerEvent
override void OnStayServerEvent(TriggerInsider insider, float deltaTime)
Definition:
areadamageonce.c:21
OnEvaluateDamageEx
bool OnEvaluateDamageEx(TriggerInsider insider, float deltaTime)
Definition:
areadamagemanager.c:218
SetDeferDuration
override void SetDeferDuration(float time)
Definition:
areadamageonce.c:16
CalculateDamageScale
override protected float CalculateDamageScale(TriggerInsider insider, float deltaTime)
Definition:
areadamageonce.c:30
m_DeferDuration
AreaDamageOnce m_DeferDuration
Time the damage should be deferred in seconds.
AreaDamageOnce
Definition:
areadamageonce.c:1
AreaDamageManager
void AreaDamageManager(EntityAI parent)
Definition:
areadamagemanager.c:22
DAYZ
scripts_v1.24.157551
scripts
world
classes
areadamage
areadamagenew
areadamageonce.c
Generated by
1.8.17