Skip to content

Commit

Permalink
Captives - Fix handcuff keybind distance check (#5823)
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror authored Nov 27, 2017
1 parent 3954907 commit b2ceeb9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addons/captives/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b2ceeb9

Please sign in to comment.