2015-02-04 19:16:19 +00:00
|
|
|
/*
|
|
|
|
* Author: PabstMirror
|
|
|
|
* Tests if player can stop escorting
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: caller (player) <OBJECT>
|
|
|
|
* 1: target <OBJECT><OPTIONAL>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* The return value <BOOL>
|
|
|
|
*
|
|
|
|
* Example:
|
2015-02-06 23:03:56 +00:00
|
|
|
* [player, bob] call ACE_captives_fnc_canStopEscorting
|
2015-02-04 19:16:19 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-04 23:15:20 +00:00
|
|
|
params ["_unit", ["_target", objNull]];
|
2015-02-04 19:16:19 +00:00
|
|
|
|
|
|
|
if (isNull _target) then {
|
2015-02-06 05:11:28 +00:00
|
|
|
_target = _unit getVariable [QGVAR(escortedUnit), objNull];
|
2015-02-04 19:16:19 +00:00
|
|
|
};
|
|
|
|
|
2015-02-19 20:34:08 +00:00
|
|
|
if (isNull _target) exitWith {false};
|
2015-02-04 19:16:19 +00:00
|
|
|
|
2015-02-19 20:34:08 +00:00
|
|
|
(_target in (attachedObjects _unit)) && {_target getVariable [QGVAR(isHandcuffed), false]}
|