DayZ 1.24
Loading...
Searching...
No Matches
AreaDamageLoopedDeferred Class Reference

Deferred version of AreaDamageLooped. More...

Inheritance diagram for AreaDamageLoopedDeferred:
[legend]
Collaboration diagram for AreaDamageLoopedDeferred:
[legend]

Protected Member Functions

override void SetDeferDuration (float time)
 
float CalculateDamageScale (TriggerInsider insider, float deltaTime)
 

Protected Attributes

float m_DeferDuration = 1.0
 Time the damage should be deferred in seconds.
 

Additional Inherited Members

- Private Member Functions inherited from AreaDamageLooped
void AreaDamageLooped (EntityAI parent, bool loopByObject=true)
 
override void OnTriggerCreated ()
 Gets called when the trigger is spawned, so is the start and also a reset.
 
override void SetLoopInterval (float time)
 
override void OnEnterServerEvent (TriggerInsider insider)
 
override void OnStayStartServerEvent (int nrOfInsiders)
 
override void OnStayServerEvent (TriggerInsider insider, float deltaTime)
 
override void OnStayFinishServerEvent ()
 
float CalculateDamageScale (TriggerInsider insider, float deltaTime)
 
- Private Attributes inherited from AreaDamageLooped
float m_CurrentTime = 0.0
 Current start time in seconds.
 
float m_PreviousTime = 0.0
 Previous start time in seconds.
 
float m_AccumulatedTime = 0.0
 How much time has accumulated.
 
float m_LoopInterval = 1.0
 Loop interval in seconds.
 
int m_AmountOfLoops = 0
 Caching of the amount of loops that will be performed in this frame.
 
bool m_LoopByObject = true
 Decides if the looping will be using the Object as reference or the time since last update loop.
 

Detailed Description

Deferred version of AreaDamageLooped.

Definition at line 2 of file AreaDamageLoopedDeferred.c.

Member Function Documentation

◆ CalculateDamageScale()

float AreaDamageLoopedDeferred::CalculateDamageScale ( TriggerInsider insider,
float deltaTime )
inlineprotected

Definition at line 12 of file AreaDamageLoopedDeferred.c.

13 {
14 if (m_DeferDuration > 0 && (insider.lastUpdated - insider.timeEntered) >= m_DeferDuration)
15 return super.CalculateDamageScale(insider, deltaTime);
16
17 return 0;
18 }
float m_DeferDuration
Time the damage should be deferred in seconds.
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

References TriggerInsider::lastUpdated, m_DeferDuration, and TriggerInsider::timeEntered.

◆ SetDeferDuration()

override void AreaDamageLoopedDeferred::SetDeferDuration ( float time)
inlineprotected

Definition at line 7 of file AreaDamageLoopedDeferred.c.

8 {
10 }

References m_DeferDuration.

Member Data Documentation

◆ m_DeferDuration

float AreaDamageLoopedDeferred::m_DeferDuration = 1.0
protected

Time the damage should be deferred in seconds.

Definition at line 5 of file AreaDamageLoopedDeferred.c.

Referenced by CalculateDamageScale(), and SetDeferDuration().


The documentation for this class was generated from the following file: