From d4d0a0a6de53f9f688eaaf6d05d856371ec0c72e Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 26 Mar 2015 00:53:38 -0500 Subject: [PATCH] Make sure to remove animEH --- addons/captives/functions/fnc_handleKilled.sqf | 4 ++-- addons/captives/functions/fnc_handleRespawn.sqf | 1 - addons/captives/functions/fnc_setSurrendered.sqf | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/captives/functions/fnc_handleKilled.sqf b/addons/captives/functions/fnc_handleKilled.sqf index 9e9c5e1ac8..720bde9df7 100644 --- a/addons/captives/functions/fnc_handleKilled.sqf +++ b/addons/captives/functions/fnc_handleKilled.sqf @@ -18,7 +18,7 @@ PARAMS_1(_oldUnit); if (_oldUnit getVariable [QGVAR(isHandcuffed), false]) then { - _oldUnit setVariable [QGVAR(isHandcuffed), false, true]; + [_oldUnit, false] call FUNC(setSurrendered); }; if (_oldUnit getVariable [QGVAR(isEscorting), false]) then { @@ -26,5 +26,5 @@ if (_oldUnit getVariable [QGVAR(isEscorting), false]) then { }; if (_oldUnit getVariable [QGVAR(isSurrendering), false]) then { - _oldUnit setVariable [QGVAR(isSurrendering), false, true]; + [_oldUnit, false] call FUNC(setSurrendered); }; diff --git a/addons/captives/functions/fnc_handleRespawn.sqf b/addons/captives/functions/fnc_handleRespawn.sqf index fe2bc0a968..8a475f860d 100644 --- a/addons/captives/functions/fnc_handleRespawn.sqf +++ b/addons/captives/functions/fnc_handleRespawn.sqf @@ -22,4 +22,3 @@ if (!local _unit) exitWith {}; [_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus); [_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus); - diff --git a/addons/captives/functions/fnc_setSurrendered.sqf b/addons/captives/functions/fnc_setSurrendered.sqf index 3a7436abc7..73451863dd 100644 --- a/addons/captives/functions/fnc_setSurrendered.sqf +++ b/addons/captives/functions/fnc_setSurrendered.sqf @@ -75,6 +75,7 @@ if (_state) then { }; }; + if (!alive _unit) exitWith {}; if (_unit getVariable ["ACE_isUnconscious", false]) exitWith {}; //don't touch animations if unconscious //if we are in "hands up" animationState, crack it now