Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
freezestate.c
Go to the documentation of this file.
1class FreezeSymptom extends SymptomBase
2{
3 //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
4 override void OnInit()
5 {
7 m_Priority = 1;
8 m_ID = SymptomIDs.SYMPTOM_FREEZE;
9 m_DestroyOnAnimFinish = true;
10 m_SyncToClient = false;
11 m_MaxCount = 2;
12 }
13
15 override void OnUpdateServer(PlayerBase player, float deltatime)
16 {
17
18 }
19
20 override void OnUpdateClient(PlayerBase player, float deltatime)
21 {
22 }
23
24 override void OnAnimationPlayFailed()
25 {
26
27 }
28
29 override bool CanActivate()
30 {
31 return true;
32 }
33
35 override void OnGetActivatedServer(PlayerBase player)
36 {
37 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetActivated", m_Player.ToString());
38 HumanMovementState hms = new HumanMovementState();
39 player.GetMovementState(hms);
40 ItemBase item = m_Player.GetItemInHands();
41
42 if (!(item && item.IsHeavyBehaviour()) && !m_Player.IsSurrendered() && m_Manager.GetCurrentCommandID() == DayZPlayerConstants.COMMANDID_MOVE && hms.m_iMovement == DayZPlayerConstants.MOVEMENTIDX_IDLE && !player.IsRestrained() && !player.IsInProne())
43 {
44 PlayAnimationADD(2);
45 }
46 else
47 {
49 }
50 }
51
53 override void OnGetActivatedClient(PlayerBase player)
54 {
55 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetActivated", m_Player.ToString());
56 }
57
59 override void OnGetDeactivatedServer(PlayerBase player)
60 {
61 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetDeactivated", m_Player.ToString());
62 }
63
65 override void OnGetDeactivatedClient(PlayerBase player)
66 {
67 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetDeactivated", m_Player.ToString());
68 }
69
71 {
72 return new HeatComfortmMetaADD();
73 }
74}
75
76class FreezeRattleSymptom extends SymptomBase
77{
78 //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
79 override void OnInit()
80 {
82 m_Priority = 100;
83 m_ID = SymptomIDs.SYMPTOM_FREEZE_RATTLE;
84 m_DestroyOnAnimFinish = true;
85 m_SyncToClient = false;
86 m_MaxCount = 2;
87 m_Duration = 2;
88 }
89
90 override bool CanActivate()
91 {
92 return true;
93 }
94
96 override void OnGetActivatedServer(PlayerBase player)
97 {
98 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetActivated", m_Player.ToString());
99
100 PlaySound(EPlayerSoundEventID.RATTLING_TEETH);
102
104 override void OnGetActivatedClient(PlayerBase player)
105 {
106 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetActivated", m_Player.ToString());
107 }
108
110 override void OnGetDeactivatedServer(PlayerBase player)
111 {
112 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetDeactivated", m_Player.ToString());
113 }
114
116 override void OnGetDeactivatedClient(PlayerBase player)
117 {
118 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetDeactivated", m_Player.ToString());
119 }
120}
float m_Duration
Definition debug.c:2
void OnGetActivatedServer(PlayerBase player)
gets called once on an Symptom which is being activated
bool CanActivate()
Definition statebase.c:348
void OnGetActivatedClient(PlayerBase player)
void OnInit()
this is just for the Symptom parameters set-up and is called even if the Symptom doesn't execute,...
void OnAnimationPlayFailed()
void OnGetDeactivatedClient(PlayerBase player)
void OnUpdateClient(PlayerBase player, float deltatime)
gets called every frame
void OnUpdateServer(PlayerBase player, float deltatime)
gets called every frame
void OnGetDeactivatedServer(PlayerBase player)
only gets called once on an active Symptom that is being deactivated
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition effect.c:51
proto string ToString()
override SmptAnimMetaBase SpawnAnimMetaObject()
DayZPlayer m_Player
Definition hand_events.c:42
void PlaySound()
ModifiersManager m_Manager
int m_SymptomType
SymptomTypes