From a8e269bc18d46f65d77599123194dc336d56277b Mon Sep 17 00:00:00 2001 From: PabstMirror <elephantisaterriblemascot@gmail.com> Date: Thu, 19 Feb 2015 14:34:08 -0600 Subject: [PATCH] Cleanup Escort Logic No more ERROR spam --- .../captives/functions/fnc_canStopEscorting.sqf | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/addons/captives/functions/fnc_canStopEscorting.sqf b/addons/captives/functions/fnc_canStopEscorting.sqf index e6a5a0e568..56065a43fc 100644 --- a/addons/captives/functions/fnc_canStopEscorting.sqf +++ b/addons/captives/functions/fnc_canStopEscorting.sqf @@ -19,22 +19,10 @@ PARAMS_1(_unit); DEFAULT_PARAM(1,_target,objNull); -private ["_isAttached"]; - if (isNull _target) then { _target = _unit getVariable [QGVAR(escortedUnit), objNull]; }; -if (isNull _target) exitWith { - ERROR("Null Target (no ACE_escortedUnit)"); - false -}; +if (isNull _target) exitWith {false}; -_isAttached = _target in (attachedObjects _unit); - -if (_isAttached && (!(_target getVariable [QGVAR(isHandcuffed), false]))) exitWith { - ERROR("Attached But Not Captive"); - false -}; - -_isAttached +(_target in (attachedObjects _unit)) && {_target getVariable [QGVAR(isHandcuffed), false]}