3 private const float UNCONSCIOUS_LIMIT = 50;
4 private const float SHOCK_INCREMENT_PER_SEC = 1;
15 override bool ActivateCondition(
PlayerBase player)
20 override bool DeactivateCondition(
PlayerBase player)
35 if ( player.m_IsDrowning )
39 if ( player.IsUnconscious() )
41 return CfgGameplayHandler.GetShockRefillSpeedUnconscious() * player.m_UnconRefillModifier;
47 if ( player.GetBrokenLegs() ==
eBrokenLegs.BROKEN_LEGS && (player.IsSwimming() || player.IsClimbingLadder()) )
54 override void OnTick(
PlayerBase player,
float deltaT)
59 if (!player.IsUnconscious())
60 player.m_UnconRefillModifier = 1;
62 if (player.GetHealth01(
"",
"Shock") == 1)
66 player.m_UnconRefillModifier = 1;
68 player.AddHealth(
"",
"Shock", deltaT * GetRefillSpeed(player) );