Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
toxicity.c
Go to the documentation of this file.
2{
3 private const float TOXICITY_CLEANUP_PER_SEC = 1;
4 private const float VOMIT_THRESHOLD = 70;
5
14
15 override bool ActivateCondition(PlayerBase player)
16 {
17 return true;
18 }
19
20 override bool DeactivateCondition(PlayerBase player)
21 {
22 return false;
23 }
24
25 override void OnTick(PlayerBase player, float deltaT)
26 {
27 player.GetStatToxicity().Add( -TOXICITY_CLEANUP_PER_SEC * deltaT );
28 if( player.GetStatToxicity().Get() > VOMIT_THRESHOLD )
29 {
30 SymptomBase symptom = player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_VOMIT);
31
32 if( symptom )
33 {
35 }
36 }
37 }
38
39 override void OnReconnect(PlayerBase player)
40 {
41
42 }
43
44 override void OnActivate(PlayerBase player)
45 {
46
47 }
48};
Definition enmath.c:7
void SetDuration(float duration)
Definition statebase.c:80
override bool DeactivateCondition(PlayerBase player)
Definition toxicity.c:20
override void OnReconnect(PlayerBase player)
Definition toxicity.c:39
override void OnActivate(PlayerBase player)
Definition toxicity.c:44
const float VOMIT_THRESHOLD
Definition toxicity.c:4
override void OnTick(PlayerBase player, float deltaT)
Definition toxicity.c:25
override void Init()
Definition toxicity.c:6
const float TOXICITY_CLEANUP_PER_SEC
Definition toxicity.c:3
override bool ActivateCondition(PlayerBase player)
Definition toxicity.c:15
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it).
Definition effect.c:51
eModifiers
Definition emodifiers.c:2
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
Definition enmath.c:54
bool m_TrackActivatedTime
overall time this modifier was active
void DisableDeactivateCheck()
float m_TickIntervalActive
float m_TickIntervalInactive
const int DEFAULT_TICK_TIME_INACTIVE
enum eModifierSyncIDs DEFAULT_TICK_TIME_ACTIVE