38 return (player.GetSingleAgentCount(
eAgents.SILICOSIS) > 0);
43 return (player.GetSingleAgentCount(
eAgents.SILICOSIS) == 0);
56 m_FaintSymptom = player.GetSymptomManager().QueueUpSecondarySymptomEx(SymptomIDs.SYMPTOM_FAINT);
62 params.param1 = SymptomIDs.SYMPTOM_FAINT;
67 params.param2 = faintData;
81 if(!player.GetCanBeDestroyed())
85 float agentsCount = player.GetSingleAgentCount(
eAgents.SILICOSIS);
93 if (heavyBreathIntensity > 0.0)
104 if (rand <= heavyBreathIntensity)
105 player.RequestSoundEventEx(
EPlayerSoundEventID.HEAVY_BREATHING,
true, EPlayerSoundEventParam.HIGHEST_PRIORITY);
128 if (!player.IsUnconscious())
136 player.AddHealth(-healthLoss);
146 params.param1 = SymptomIDs.SYMPTOM_FAINT;
151 params.param2 = faintData;
162 params.param1 = SymptomIDs.SYMPTOM_FAINT;
167 params.param2 = faintData;
182 params.param1 = SymptomIDs.SYMPTOM_FAINT;
187 params.param2 = faintData;
202 if ((agentsCount >
UNCON_THRESHOLD && canTriggerUnconsciousness) || player.IsUnconscious())
207 player.RequestUnconsciousness(
true);
208 player.SetHealth(
"",
"Shock", 25.0);
215 player.RequestUnconsciousness(
false);
bool m_TrackActivatedTime
overall time this modifier was active
float m_TickIntervalActive
float m_TickIntervalInactive
const int DEFAULT_TICK_TIME_INACTIVE_LONG
const int STAMINA_LIMIT_TRESHOLD
float m_UnconciousnessInactiveTimer
const float HEAVY_BREATH_INTERVAL_MIN
min #num of agents
static const float UNCONSCIOUSNESS_EVENT_INTERVAL_MAX
override void OnTick(PlayerBase player, float deltaT)
static const float UNCONSCIOUSNESS_LENGTH_MAX
ref SymptomBase m_FaintSymptom
const float HEAVY_BREATH_INTERVAL_MAX
seconds
float m_NextUnconsciousnessEvent
const int UNCON_THRESHOLD
bool ActivateCondition(PlayerBase player)
static const float UNCONSCIOUSNESS_LENGTH_MIN
Unconsciousness.
override void OnActivate(PlayerBase player)
override void OnDeactivate(PlayerBase player)
override bool DeactivateCondition(PlayerBase player)
const int HEAVY_BREATH_TRESHOLD_MIN
bool m_CanFaintEffectFadeOut
static const float UNCONSCIOUSNESS_EVENT_INTERVAL_MIN
float m_AgentsCountPrevious
float m_UnconciousnessActiveTimer
const int HEALTH_THRESHOLD
bool m_CanFaintEffectFadeIn
seconds
ref TFloatArray m_FloatArray
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
static proto int Randomize(int seed)
Sets the seed for the random number generator.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
static float Remap(float inputMin, float inputMax, float outputMin, float outputMax, float inputValue, bool clampedOutput=true)
Returns given value remaped from input range into output range.