DayZ 1.24
Loading...
Searching...
No Matches
AreaDamageLoopedDeferred.c
Go to the documentation of this file.
1
3{
5 protected float m_DeferDuration = 1.0;
6
7 override void SetDeferDuration(float time)
8 {
10 }
11
12 override protected float CalculateDamageScale(TriggerInsider insider, float deltaTime)
13 {
14 if (m_DeferDuration > 0 && (insider.lastUpdated - insider.timeEntered) >= m_DeferDuration)
15 return super.CalculateDamageScale(insider, deltaTime);
16
17 return 0;
18 }
19}
Deferred version of AreaDamageLooped.
float CalculateDamageScale(TriggerInsider insider, float deltaTime)
override void SetDeferDuration(float time)
float m_DeferDuration
Time the damage should be deferred in seconds.
The object which is in a trigger and its metadata.
Definition Trigger.c:3
float lastUpdated
Last time the object was updated in seconds, is used for calculating deltaTime.
Definition Trigger.c:16
float timeEntered
Time the object was first seen in seconds.
Definition Trigger.c:13