Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
heatbuffer.c
Go to the documentation of this file.
2 {
3  protected const float HEATBUFFER_SHOW = 25.0;
4  protected const float HEATBUFFER_HIDE = 20.0;
5 
6  override void Init()
7  {
8  m_TrackActivatedTime = false;
9  m_ID = eModifiers.MDF_HEATBUFFER;
12  }
13 
14  override void OnTick(PlayerBase player, float deltaT)
15  {
16 
17  }
18 
19  override bool ActivateCondition(PlayerBase player)
20  {
21  float heatbuffer = player.GetStatHeatBuffer().Get();
22  if ( heatbuffer >= HEATBUFFER_SHOW )
23  {
24  return true;
25  }
26  else
27  {
28  return false;
29  }
30  }
31 
32  override void OnActivate(PlayerBase player)
33  {
34  if( player.GetNotifiersManager() )
35  {
36  //player.GetNotifiersManager().ActivateByType(eNotifiers.NTF_HEATBUFFER);
37  player.ToggleHeatBufferVisibility( true );
38  }
39  }
40 
41  override void OnDeactivate(PlayerBase player)
42  {
43  if( player.GetNotifiersManager() )
44  {
45  //player.GetNotifiersManager().DeactivateByType(eNotifiers.NTF_HEATBUFFER);
46  player.ToggleHeatBufferVisibility( false );
47  }
48  }
49 
50  override bool DeactivateCondition(PlayerBase player)
51  {
52  float heatbuffer = player.GetStatHeatBuffer().Get();
53  if ( heatbuffer < HEATBUFFER_HIDE )
54  {
55  return true;
56  }
57  else
58  {
59  return false;
60  }
61  }
62 };
m_TickIntervalActive
float m_TickIntervalActive
Definition: modifierbase.c:19
m_TrackActivatedTime
bool m_TrackActivatedTime
Definition: modifierbase.c:15
HeatBufferMdfr
Definition: heatbuffer.c:1
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
m_ID
protected int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition: effect.c:49