From bd56d1bb83855cd055f21b2e779337e19fab87f1 Mon Sep 17 00:00:00 2001 From: jokoho48 Date: Fri, 14 Aug 2015 00:36:36 +0200 Subject: [PATCH] ok that is my fault --- addons/hearing/functions/fnc_firedNear.sqf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/hearing/functions/fnc_firedNear.sqf b/addons/hearing/functions/fnc_firedNear.sqf index 02de8db928..1ede8db3ea 100644 --- a/addons/hearing/functions/fnc_firedNear.sqf +++ b/addons/hearing/functions/fnc_firedNear.sqf @@ -37,11 +37,11 @@ _vehAttenuation = if ((ACE_player == (vehicle ACE_player)) || {isTurnedOut ACE_p _distance = 1 max _distance; -_silencer = call { - if (_weapon == primaryWeapon _firer) exitWith {(primaryWeaponItems _firer) select 0}; - if (_weapon == secondaryWeapon _firer) exitWith {(secondaryWeaponItems _firer) select 0}; - if (_weapon == handgunWeapon _firer) exitWith {(handgunItems _firer) select 0}; - "" +_silencer = switch (_weapon) do { + case (primaryWeapon _firer) : {(primaryWeaponItems _firer) select 0}; + case (secondaryWeapon _firer) : {(secondaryWeaponItems _firer) select 0}; + case (handgunWeapon _firer) : {(handgunItems _firer) select 0}; + default {""}; }; _audibleFireCoef = 1;