Fix panic sound chance from fbc56ff #1861

Previously was ~8% chance every 1 second, so ~72% chance to play once or
more every 9 seconds.

Now it is a 50% chance to play once every 9 seconds.
This commit is contained in:
ebayShopper
2017-02-12 16:04:48 -05:00
parent fbc56ff556
commit 2ef93e6c57

View File

@@ -131,10 +131,11 @@ if (_attacked) then {
[_refObj, "scream", 6, false] call dayz_zombieSpeak;
} else {
_lowBlood = (r_player_blood / r_player_bloodTotal) < 0.5;
if (diag_ticktime - dayz_panicCooldown > 18 && _lowBlood) then {
if (diag_ticktime - dayz_panicCooldown > 9 && _lowBlood) then {
//Prevents overlapping sounds (panic tracks are 4-9s, this script is called every 1s)
//50% chance every 9s
dayz_panicCooldown = diag_ticktime;
[_refObj, "panic", 6, false] call dayz_zombieSpeak;
[_refObj, "panic", 1, false] call dayz_zombieSpeak;
};
};
};