Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
sneezestate.c
Go to the documentation of this file.
1class SneezeSymptom 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 = 100;
8 m_ID = SymptomIDs.SYMPTOM_SNEEZE;
9 m_DestroyOnAnimFinish = true;
10 m_SyncToClient = false;
11 }
12
14 override void OnUpdateServer(PlayerBase player, float deltatime)
15 {
16
17 }
18
19 override void OnUpdateClient(PlayerBase player, float deltatime)
20 {
21 }
22
24 override void OnGetActivatedServer(PlayerBase player)
25 {
26 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetActivated", m_Player.ToString());
27 if( m_Manager.GetCurrentCommandID() == DayZPlayerConstants.COMMANDID_MOVE && !player.IsRaised() && player.GetCommand_Move() && !player.GetCommand_Move().IsOnBack())
28 {
29 PlayAnimationADD(0);
30 }
31 else
32 {
33 PlaySound(EPlayerSoundEventID.SYMPTOM_SNEEZE);
34 }
35 player.SpreadAgentsEx(3);
36 }
37
39 override void OnGetActivatedClient(PlayerBase player)
40 {
41 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetActivated", m_Player.ToString());
42 }
43
44
46 override void OnGetDeactivatedServer(PlayerBase player)
47 {
48 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetDeactivated", m_Player.ToString());
49 }
50
52 override void OnGetDeactivatedClient(PlayerBase player)
53 {
54 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetDeactivated", m_Player.ToString());
55 }
56
58 {
59 return new SmptAnimMetaADD();
60 }
61}
Definition debug.c:2
void OnGetActivatedServer(PlayerBase player)
gets called once on an Symptom which is being activated
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 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