Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
tremor.c
Go to the documentation of this file.
2 {
3  private const float TREMOR_DECREMENT_PER_SEC = 0.008;
4 
5  override void Init()
6  {
7  m_TrackActivatedTime = false;
8  m_ID = eModifiers.MDF_TREMOR;
11  }
12 
13  override bool ActivateCondition(PlayerBase player)
14  {
15  if ( player.GetStatTremor().Get() > player.GetStatTremor().GetMin() )
16  {
17  return true;
18  }
19  else
20  {
21  return false;
22  }
23  }
24 
25  override bool DeactivateCondition(PlayerBase player)
26  {
27  if ( player.GetStatTremor().Get() == player.GetStatTremor().GetMin() )
28  {
29  return true;
30  }
31  else
32  {
33  return false;
34  }
35  }
36 
37  override void OnTick(PlayerBase player, float deltaT)
38  {
39  player.GetStatTremor().Add( (TREMOR_DECREMENT_PER_SEC*deltaT) );
40 
41  //Mirek: SetShakeBodyFactor is removed now, because it worked only on legacy animation system
42  //player.SetShakeBodyFactor(player.GetStatTremor().Get());
43  //_person SetBodyShaking tremor; ASK GAMEPLAY PROGRAMMERS TO EXPOSE THIS ENGINE FUNCTION IN ENSCRIPT
44  //PrintString( "Tremor:" + ToString(tremor) );
45  }
46 };
m_TickIntervalActive
float m_TickIntervalActive
Definition: modifierbase.c:19
m_TrackActivatedTime
bool m_TrackActivatedTime
Definition: modifierbase.c:15
DEFAULT_TICK_TIME_ACTIVE
const int DEFAULT_TICK_TIME_ACTIVE
Definition: modifiersmanager.c:31
PlayerBase
Definition: playerbaseclient.c:1
m_TickIntervalInactive
float m_TickIntervalInactive
Definition: modifierbase.c:18
eModifiers
eModifiers
Definition: emodifiers.c:1
ModifierBase
Definition: breathvapourmdfr.c:3
TremorMdfr
Definition: tremor.c:1
m_ID
protected int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition: effect.c:49
DEFAULT_TICK_TIME_INACTIVE
const int DEFAULT_TICK_TIME_INACTIVE
Definition: modifiersmanager.c:33