DayZ 1.24
Loading...
Searching...
No Matches
BoneRegen.c
Go to the documentation of this file.
2{
3 private const float MINIMAL_WATER_TO_REGENRATE = 2500;
4 private const float MINIMAL_ENERGY_TO_REGENRATE = 4000;
5 private const float MINIMAL_BLOOD_TO_REGENRATE = 5000;
7 private const float BONE_HEALTH_INCREMENT_PER_SEC = 0.25;
8
16
18 {
19 if (player.GetHealth("GlobalHealth", "Blood") >= MINIMAL_BLOOD_TO_REGENRATE && player.GetStatWater().Get() >= MINIMAL_WATER_TO_REGENRATE && player.GetStatEnergy().Get() >= MINIMAL_ENERGY_TO_REGENRATE)
20 return true;
21 else
22 return false;
23 }
24
26 {
27 }
28
30 {
31 if (player.GetHealth("GlobalHealth", "Blood") < MINIMAL_BLOOD_TO_REGENRATE && player.GetStatWater().Get() < MINIMAL_WATER_TO_REGENRATE && player.GetStatEnergy().Get() < MINIMAL_ENERGY_TO_REGENRATE)
32 return true;
33 else
34 return false;
35 }
36
37 override void OnTick(PlayerBase player, float deltaT)
38 {
39 /*
40 player.AddHealth("RightArm","Health",BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
41 player.AddHealth("RightHand","Health",BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
42 player.AddHealth("LeftArm","Health",BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
43 player.AddHealth("LeftHand","Health",+BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
44
45 player.AddHealth("RightLeg","Health",+BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
46 player.AddHealth("RightFoot","Health",+BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
47 player.AddHealth("LeftLeg","Health",+BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
48 player.AddHealth("LeftFoot","Health",+BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
49
50 player.AddHealth("Torso","Health",+BONE_HEALTH_INCREMENT_PER_SEC * deltaT);
51 */
52 }
53};
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
bool m_TrackActivatedTime
float m_TickIntervalActive
float m_TickIntervalInactive
const int DEFAULT_TICK_TIME_INACTIVE
const int DEFAULT_TICK_TIME_ACTIVE
const float MINIMAL_BLOOD_TO_REGENRATE
Definition BoneRegen.c:5
override void OnTick(PlayerBase player, float deltaT)
Definition BoneRegen.c:37
const float MINIMAL_WATER_TO_REGENRATE
Definition BoneRegen.c:3
override bool ActivateCondition(PlayerBase player)
Definition BoneRegen.c:17
const float BONE_HEALTH_INCREMENT_PER_SEC
Definition BoneRegen.c:7
override void OnActivate(PlayerBase player)
Definition BoneRegen.c:25
const float MINIMAL_ENERGY_TO_REGENRATE
Definition BoneRegen.c:4
override void Init()
Definition BoneRegen.c:9
override bool DeactivateCondition(PlayerBase player)
Definition BoneRegen.c:29
const float MINIMAL_BLOOD_REQUIRED_TO_REGENERATE_HEALTH
Definition BoneRegen.c:6
eModifiers
Definition eModifiers.c:2