Fire - Fix animals screaming like humans (#8625)

* Fire - Only human screams

* Use fnc_burnReaction for screams

Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
This commit is contained in:
Whigital 2021-11-09 03:48:54 +01:00 committed by GitHub
parent 727ac12e6c
commit d73f0f3db4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

View File

@ -302,9 +302,7 @@ if (_isBurning) exitWith {};
_unit setVariable [QGVAR(burnUIPFH), _burnIndicatorPFH];
};
private _soundID = floor (1 + random 15);
private _sound = format [QGVAR(scream_%1), _soundID];
[QGVAR(playScream), [_sound, _unit]] call CBA_fnc_globalEvent;
[_unit, false] call FUNC(burnReaction);
};
_lastIntensityUpdate = 0;

View File

@ -5,6 +5,7 @@
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Should unit throw its current weapon <BOOL>
*
* Return Value:
* None
@ -12,16 +13,19 @@
* Public: No
*/
params ["_unit"];
params ["_unit", ["_throwWeapon", true]];
if (
GVAR(dropWeapon) > 0
_throwWeapon
&& {GVAR(dropWeapon) > 0}
&& {_unit in _unit && { !(currentWeapon _unit isEqualTo "") }}
&& {!isPlayer _unit || GVAR(dropWeapon >= 2)}
) then {
[_unit] call EFUNC(hitreactions,throwWeapon);
};
private _soundID = floor (1 + random 15);
private _sound = format [QGVAR(scream_%1), _soundID];
[QGVAR(playScream), [_sound, _unit]] call CBA_fnc_globalEvent;
if (_unit isKindOf "CAManBase") then {
private _soundID = floor (1 + random 15);
private _sound = format [QGVAR(scream_%1), _soundID];
[QGVAR(playScream), [_sound, _unit]] call CBA_fnc_globalEvent;
};