DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
PlayerSymptoms/States/Secondary/IrritatedEyes.c
См. документацию.
2{
3 protected float m_IrritationAmount;
4
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_Priority = 0;
9 m_SymptomType = SymptomTypes.SECONDARY;
10 m_ID = SymptomIDs.SYMPTOM_IRRITATED_EYES;
12 m_IsPersistent = false;
14 m_SyncToClient = true;
15 }
16
17 override void SetParam(Param p)
18 {
20 if (params && params.param1 == SymptomIDs.SYMPTOM_IRRITATED_EYES)
21 {
22 SymptomSyncData irritatedEyesData = params.param2;
23 CachedObjectsParams.PARAM1_FLOAT.param1 = irritatedEyesData.m_FloatArray[0];
24
25 #ifdef SERVER
26 g_Game.RPCSingleParam(m_Player, ERPCs.RPC_SYMPTOM_PARAM_SYNC, params, true, m_Player.GetIdentity());
27 #endif
28 }
29 }
30
31 override void OnUpdateClient(PlayerBase player, float deltatime)
32 {
33 Param1<float> params = new Param1<float>(0.0);
34 params.param1 = CachedObjectsParams.PARAM1_FLOAT.param1;
35 g_Game.GetMission().GetEffectWidgets().UpdateWidgets(EffectWidgetsTypes.EYE_VEINS, deltatime, params, EffectWidgetHandles.EYE_VEINS);
36 }
37
39 override void OnGetActivatedClient(PlayerBase player)
40 {
42 Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetActivated", m_Player.ToString());
43
44 g_Game.GetMission().GetEffectWidgets().AddActiveEffects({EffectWidgetsTypes.EYE_VEINS});
45 }
46
48 override void OnGetDeactivatedClient(PlayerBase player)
49 {
51 Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetDeactivated", m_Player.ToString());
52
53 Param1<float> params = new Param1<float>(0.0);
54 g_Game.GetMission().GetEffectWidgets().UpdateWidgets(EffectWidgetsTypes.EYE_VEINS, 0.0, params, EffectWidgetHandles.EYE_VEINS);
55 g_Game.GetMission().GetEffectWidgets().RemoveActiveEffects({EffectWidgetsTypes.EYE_VEINS});
56 }
57}
DayZGame g_Game
Определения DayZGame.c:4074
ERPCs
Определения ERPCs.c:2
proto string ToString()
SymptomTypes
Определения StateManager.c:35
static ref Param1< float > PARAM1_FLOAT
Определения UtilityClasses.c:13
static void SymptomLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Определения 3_Game/DayZ/tools/Debug.c:193
Определения 3_Game/DayZ/tools/Debug.c:2
override void OnUpdateClient(PlayerBase player, float deltatime)
override void OnGetActivatedClient(PlayerBase player)
gets called once on an Symptom which is being activated
override void OnGetDeactivatedClient(PlayerBase player)
only gets called once on an active Symptom that is being deactivated
override void SetParam(Param p)
static bool IsSymptomLogEnable()
Определения 3_Game/DayZ/tools/Debug.c:819
Определения PPEConstants.c:68
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Определения param.c:12
Определения PlayerBaseClient.c:2
bool m_IsPersistent
Определения StateBase.c:19
bool m_SyncToClient
Определения StateBase.c:21
float m_ServerUpdateInterval
Определения StateBase.c:9
int m_Priority
Определения StateBase.c:4
bool m_DestroyOnAnimFinish
Определения StateBase.c:16
int m_ID
Определения StateBase.c:13
int m_SymptomType
Определения StateBase.c:18
void SymptomBase()
Определения StateBase.c:30
PlayerBase m_Player
Определения StateBase.c:8
ref TFloatArray m_FloatArray
Определения StateManager.c:53
Определения StateManager.c:51