Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
blinded.c
Go to the documentation of this file.
2 {
3  private const float BLIND_TIME = 7;
4  private float m_Timer;
5 
6  override void Init()
7  {
8  m_TrackActivatedTime = false;
9  m_ID = eModifiers.MDF_BLINDED;
13  }
14 
15  override bool ActivateCondition(PlayerBase player)
16  {
17  return false;
18  }
19 
20  override void OnActivate(PlayerBase player)
21  {
22  m_Timer = 0;
23 
24  }
25 
26  override void OnDeactivate(PlayerBase player)
27  {
28  g_Game.GetWorld().SetAperture(0);
29  }
30 
31 
32  override bool DeactivateCondition(PlayerBase player)
33  {
34  if ( m_Timer > BLIND_TIME )
35  {
36  return true;
37  }
38  else
39  {
40  return false;
41  }
42  }
43 
44  override void OnTick(PlayerBase player, float deltaT)
45  {
46  m_Timer++;
47  g_Game.GetWorld().SetAperture(m_Timer);
48  }
49 };
m_Timer
ref Timer m_Timer
Definition: dayzgame.c:690
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
g_Game
DayZGame g_Game
Definition: dayzgame.c:3727
BlindedMdfr
Definition: blinded.c:1
m_TickIntervalInactive
float m_TickIntervalInactive
Definition: modifierbase.c:18
eModifiers
eModifiers
Definition: emodifiers.c:1
ModifierBase
Definition: breathvapourmdfr.c:3
DisableActivateCheck
void DisableActivateCheck()
Definition: modifierbase.c:78
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