mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
hearing: buggy PFH
This commit is contained in:
parent
cc7d67a150
commit
f082242485
@ -24,27 +24,24 @@ GVAR(newStrength) = GVAR(newStrength) max _strength;
|
||||
|
||||
if (missionNamespace getVariable [QGVAR(isEarRingingPlaying), false]) exitWith {};
|
||||
|
||||
_fnc_removeEarRinging = {
|
||||
GVAR(isEarRingingPlaying) = false;
|
||||
// Delete this PFH, so it is only executed once
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
if (_strength > 0.75) exitWith {
|
||||
playSound "ACE_EarRinging_Heavy";
|
||||
GVAR(isEarRingingPlaying) = true;
|
||||
0 spawn {
|
||||
sleep 7;
|
||||
GVAR(isEarRingingPlaying) = false;
|
||||
};
|
||||
[_fnc_removeEarRinging, 7.0, [] ] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
if (_strength > 0.5) exitWith {
|
||||
playSound "ACE_EarRinging_Medium";
|
||||
GVAR(isEarRingingPlaying) = true;
|
||||
0 spawn {
|
||||
sleep 5;
|
||||
GVAR(isEarRingingPlaying) = false;
|
||||
};
|
||||
[_fnc_removeEarRinging, 5.0, [] ] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
if (_strength > 0.2) exitWith {
|
||||
playSound "ACE_EarRinging_Weak";
|
||||
GVAR(isEarRingingPlaying) = true;
|
||||
0 spawn {
|
||||
sleep 3;
|
||||
GVAR(isEarRingingPlaying) = false;
|
||||
};
|
||||
[_fnc_removeEarRinging, 3.0, [] ] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user