Captives - Fix handcuff keybind distance check (#5823)

This commit is contained in:
PabstMirror 2017-11-26 22:43:45 -06:00 committed by GitHub
parent 3954907592
commit b2ceeb9936
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,7 +40,8 @@ if (!hasInterface) exitWith {};
{
private _target = cursorObject;
if !([ACE_player, _target, []] call EFUNC(common,canInteractWith)) exitWith {false};
if !(_target isKindOf "CAManBase" || {(_target distance ACE_player) > getNumber (configFile >> "CfgVehicles" >> "CAManBase" >> "ACE_Actions" >> "ACE_ApplyHandcuffs" >> "distance")}) exitWith {false};
if !(_target isKindOf "CAManBase") exitWith {false};
if ((_target distance ACE_player) > getNumber (configFile >> "CfgVehicles" >> "CAManBase" >> "ACE_Actions" >> "ACE_ApplyHandcuffs" >> "distance")) exitWith {false};
if ([ACE_player, _target] call FUNC(canApplyHandcuffs)) exitWith {
[QGVAR(setHandcuffed), [_target, true], _target] call CBA_fnc_targetEvent;