mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Fix panic sound overlapping #1861
This commit is contained in:
@@ -131,7 +131,8 @@ if (_attacked) then {
|
||||
[_refObj, "scream", 6, false] call dayz_zombieSpeak;
|
||||
} else {
|
||||
_lowBlood = (r_player_blood / r_player_bloodTotal) < 0.5;
|
||||
if (_lowBlood) then {
|
||||
if (diag_ticktime - dayz_panicCooldown > 18 && _lowBlood) then {
|
||||
//Prevents overlapping sounds (panic tracks are 4-9s, this script is called every 1s)
|
||||
dayz_panicCooldown = diag_ticktime;
|
||||
[_refObj, "panic", 6, false] call dayz_zombieSpeak;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user