Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
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;
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());
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 {
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
map m_Player
string Debug()
Definition debug.c:2
static void SymptomLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Definition debug.c:192
int m_iMovement
current stance (DayZPlayerConstants.STANCEIDX_ERECT, ...), only if the command has a stance
Definition human.c:1157
static bool IsSymptomLogEnable()
Definition debug.c:806
void OnGetDeactivatedServer(PlayerBase player)
only gets called once on an active Symptom that is being deactivated
override void OnInit()
Definition freezestate.c:4
bool m_SyncToClient
Definition statebase.c:21
override void OnUpdateClient(PlayerBase player, float deltatime)
Definition freezestate.c:20
override void OnGetDeactivatedServer(PlayerBase player)
only gets called once on an active Symptom that is being deactivated
Definition freezestate.c:59
int m_Priority
Definition statebase.c:4
override void OnGetActivatedServer(PlayerBase player)
gets called once on an Symptom which is being activated
Definition freezestate.c:35
int m_SymptomType
Definition statebase.c:18
override void OnGetActivatedClient(PlayerBase player)
gets called once on a Symptom which is being activated
Definition freezestate.c:53
PlayerBase m_Player
Definition statebase.c:8
override void OnGetDeactivatedClient(PlayerBase player)
only gets called once on an active Symptom that is being deactivated
Definition freezestate.c:65
int m_MaxCount
Definition statebase.c:24
void OnGetActivatedServer(PlayerBase player)
gets called once on an Symptom which is being activated
void OnGetDeactivatedClient(PlayerBase player)
void OnInit()
this is just for the Symptom parameters set-up and is called even if the Symptom doesn't execute,...
void OnGetActivatedClient(PlayerBase player)
SymptomManager m_Manager
Definition statebase.c:20
override void OnAnimationPlayFailed()
Definition freezestate.c:24
override SmptAnimMetaBase SpawnAnimMetaObject()
Definition freezestate.c:70
override void OnUpdateServer(PlayerBase player, float deltatime)
gets called every frame
Definition freezestate.c:15
override bool CanActivate()
Definition freezestate.c:29
void PlayAnimationADD(int type)
Definition statebase.c:251
bool m_DestroyOnAnimFinish
Definition statebase.c:16
bool CanActivate()
Definition statebase.c:354
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()
void PlaySound()
int m_SymptomType
SymptomTypes