Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
handshivers.c
Go to the documentation of this file.
1 
2 class HandShiversSymptom extends SymptomBase
3 {
4  int m_ShakeLevel;
5  //this is just for the Symptom parameters set-up and is called even if the Symptom doesn't execute, don't put any gameplay code in here
6  override void OnInit()
7  {
8  m_SymptomType = SymptomTypes.SECONDARY;
9  m_Priority = 0;
10  m_ID = SymptomIDs.SYMPTOM_HAND_SHIVER;
11  m_SyncToClient = false;
12 
13  }
14 
15  override void SetParam(Param p)
16  {
17  Param1<int> p1 = Param1<int>.Cast(p);
18  if ( p1 )
19  {
20  m_ShakeLevel = p1.param1;
21 
22  if ( m_ShakeLevel > PlayerBase.SHAKE_LEVEL_MAX )
23  {
24  m_ShakeLevel = PlayerBase.SHAKE_LEVEL_MAX;
25  }
26  }
27  }
28 
29 
30  override void OnUpdateClient(PlayerBase player, float deltatime)
31  {
32  }
33 
34 
35  override void OnGetActivatedServer(PlayerBase player)
36  {
37  player.SetShakesForced(m_ShakeLevel);
38  }
39 
40  override void OnGetDeactivatedServer(PlayerBase player)
41  {
42  player.SetShakesForced(0);
43  }
44 
45  override void OnGetActivatedClient(PlayerBase player)
46  {
47 
48 
49  }
50 
52  override void OnGetDeactivatedClient(PlayerBase player)
53  {
54 
55  }
56 
57 }
Param
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition: param.c:11
m_Priority
int m_Priority
Definition: bioslobbyservice.c:34
SymptomBase
Definition: statebase.c:1
m_SymptomType
int m_SymptomType
Definition: smptanimmeta.c:13
PlayerBase
Definition: playerbaseclient.c:1
OnUpdateClient
void OnUpdateClient(ActionData action_data)
Definition: actionbase.c:998
SymptomTypes
SymptomTypes
Definition: statemanager.c:26
OnInit
void OnInit()
Definition: aibehaviour.c:49
m_ID
protected int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition: effect.c:49