DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл AreaDamageOnce.c

См. исходные тексты.

Структуры данных

class  AreaDamageOnce
 

Функции

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

Переменные

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

Функции

◆ CalculateDamageScale()

float CalculateDamageScale ( TriggerInsider insider,
float deltaTime )
protected
31 {
32 if ( m_DeferDuration > 0 && (insider.lastUpdated - insider.timeEntered) >= m_DeferDuration )
33 return super.CalculateDamageScale(insider, deltaTime);
34
35 return 0;
36 }
AreaDamageOnce m_DeferDuration
Time the damage should be deferred in seconds.
Definition EntityAI.c:95
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

Перекрестные ссылки TriggerInsider::lastUpdated, m_DeferDuration и TriggerInsider::timeEntered.

◆ OnStayServerEvent()

override void OnStayServerEvent ( TriggerInsider insider,
float deltaTime )
22 {
23 super.OnStayServerEvent(insider, deltaTime);
24
26 if ( CastTo( dInsider, insider ) && dInsider.lastDamaged == 0 )
27 OnEvaluateDamageEx(insider, 1);
28 }
bool OnEvaluateDamageEx(TriggerInsider insider, float deltaTime)
Definition AreaDamageManager.c:218
Extended TriggerInsider for AreaDamageTriggerBase.
Definition AreaDamageTriggerBase.c:3

Перекрестные ссылки OnEvaluateDamageEx().

◆ SetDeferDuration()

override void SetDeferDuration ( float time)
17 {
19 }

Перекрестные ссылки m_DeferDuration.

Переменные

◆ m_DeferDuration

AreaDamageOnce m_DeferDuration = 1.0

Time the damage should be deferred in seconds.

Используется в CalculateDamageScale(), SetDeferDuration(), AreaDamageBase::SetDeferDuration() и AreaDamageRegular::SetDeferDuration().