DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
BloodLoss.c
См. документацию.
1class BloodLoss extends SymptomBase
2{
3 Material m_MatGauss;
4 const int BLUR_DURATION = 3000;
5 float m_BloodSet;
6 PPERequester_BloodLoss m_RequesterBloodLoss;
7
8 //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
9 override void OnInit()
10 {
11 m_SymptomType = SymptomTypes.SECONDARY;
12 m_Priority = 0;
13 m_ID = SymptomIDs.SYMPTOM_BLOODLOSS;
15 m_IsPersistent = false;
16 m_SyncToClient = true;
17 m_BloodSet = -1;
18
19 if ( !GetGame().IsDedicatedServer() )
20 {
21 Class.CastTo(m_RequesterBloodLoss,PPERequester_BloodLoss.Cast(PPERequesterBank.GetRequester(PPERequester_BloodLoss)));
22 }
23
24 }
25
27 override void OnUpdateServer(PlayerBase player, float deltatime)
28 {
29 }
30
31 override void OnUpdateClient(PlayerBase player, float deltatime)
32 {
33 if ( player.IsPlayerSelected() && player.GetTransferValues() && player.GetTransferValues().GetBlood() != m_BloodSet )
34 {
35 m_BloodSet = player.GetTransferValues().GetBlood();
36 if (m_BloodSet < 1.0)
37 {
38 m_RequesterBloodLoss.SetBloodLossLevel(m_BloodSet);
39 }
40 else
41 {
43 }
44 }
45 }
46
48 override void OnGetActivatedServer(PlayerBase player)
49 {
50 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetActivated", m_Player.ToString());
51 }
52
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
58 override void OnGetDeactivatedServer(PlayerBase player)
59 {
60 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetDeactivated", m_Player.ToString());
61 }
62
64 override void OnGetDeactivatedClient(PlayerBase player)
65 {
66 if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetDeactivated", m_Player.ToString());
67 }
68}
proto string ToString()
SymptomTypes
Определения StateManager.c:32
Super root of all classes in Enforce script.
Определения EnScript.c:11
static void SymptomLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Определения Debug.c:132
Определения Debug.c:2
static bool IsSymptomLogEnable()
Определения Debug.c:708
Определения Debug.c:594
Определения PlayerBaseClient.c:2
bool m_IsPersistent
Определения StateBase.c:19
override void OnGetActivatedClient(PlayerBase player)
Определения BloodLoss.c:53
bool m_SyncToClient
Определения StateBase.c:21
override void OnInit()
Определения BloodLoss.c:9
int m_Priority
Определения StateBase.c:4
override void OnGetActivatedServer(PlayerBase player)
gets called once on an Symptom which is being activated
Определения BloodLoss.c:48
bool m_DestroyOnAnimFinish
Определения StateBase.c:16
override void OnGetDeactivatedServer(PlayerBase player)
Определения BloodLoss.c:58
int m_ID
Определения StateBase.c:13
int m_SymptomType
Определения StateBase.c:18
override void OnUpdateClient(PlayerBase player, float deltatime)
Определения BloodLoss.c:31
PPERequester_BloodLoss m_RequesterBloodLoss
Определения BloodLoss.c:6
float m_BloodSet
Определения BloodLoss.c:5
override void OnUpdateServer(PlayerBase player, float deltatime)
gets called every frame
Определения BloodLoss.c:27
override void OnGetDeactivatedClient(PlayerBase player)
only gets called once on an active Symptom that is being deactivated
Определения BloodLoss.c:64
PlayerBase m_Player
Определения StateBase.c:8
Определения StateBase.c:2
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
int[] Material
Определения proto.c:265