From 0a91dfa7b25d7f75825f1e86eb06143ab61269e2 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Mon, 18 Jan 2016 13:23:55 -0300 Subject: [PATCH] Do not add or remove earplugs if gear should be preserved. Fix #3180. --- addons/hearing/functions/fnc_handleRespawn.sqf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/hearing/functions/fnc_handleRespawn.sqf b/addons/hearing/functions/fnc_handleRespawn.sqf index 527d5d6b16..5bad68761c 100644 --- a/addons/hearing/functions/fnc_handleRespawn.sqf +++ b/addons/hearing/functions/fnc_handleRespawn.sqf @@ -20,6 +20,9 @@ TRACE_2("params",_unit,typeOf _unit); if (!local _unit) exitWith {}; //XEH should only be called on local units +//Do not add or remove earplugs if gear should be preserved +if (missionNamespace getVariable [QEGVAR(respawn,SavePreDeathGear), false]) exitWith {}; + private _respawn = [0] call BIS_fnc_missionRespawnType; //if respawn is not Group or side: