3 const int TICK_FREQUENCY = 1;
4 static const float STAMINA_RECOVERY_MULTIPLIER = 0;
17 return player.GetDrowningWaterLevelCheck();
20 override bool ActivateCondition(
PlayerBase player)
22 return CheckIsDrowning(player);
25 override bool DeactivateCondition(
PlayerBase player)
27 return !CheckIsDrowning(player);
30 override void OnTick(
PlayerBase player,
float deltaT)
32 if (player.GetStaminaHandler().GetStamina() <= 0)
36 player.RequestSoundEventEx(
EPlayerSoundEventID.DROWNING_PAIN,
false, EPlayerSoundEventParam.HIGHEST_PRIORITY);
47 player.SetDrowning(
true);
49 player.RequestSoundEventEx(
EPlayerSoundEventID.DROWNING_BREATH,
false, EPlayerSoundEventParam.HIGHEST_PRIORITY);
54 void PlayDrowningSound(
int index)
71 player.SetDrowning(
false);