From 0856e58ae9ffcacf0caccb95fcab4efc453ca06d Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Mon, 18 Mar 2024 18:16:34 +0100 Subject: [PATCH] Dragging - Release ownership when target is too heavy to drag/carry (#9858) Release ownership when target is too heavy to drag/carry --- addons/dragging/functions/fnc_startCarryLocal.sqf | 3 +++ addons/dragging/functions/fnc_startDragLocal.sqf | 3 +++ 2 files changed, 6 insertions(+) diff --git a/addons/dragging/functions/fnc_startCarryLocal.sqf b/addons/dragging/functions/fnc_startCarryLocal.sqf index 15101e2950..2fc0af5e24 100644 --- a/addons/dragging/functions/fnc_startCarryLocal.sqf +++ b/addons/dragging/functions/fnc_startCarryLocal.sqf @@ -31,6 +31,9 @@ if !(_target getVariable [QGVAR(ignoreWeightCarry), false]) then { // Exit if object weight is over global var value if (_weight > GETMVAR(ACE_maxWeightCarry,1E11)) exitWith { + // Release claim on object + [objNull, _target, true] call EFUNC(common,claim); + [LLSTRING(UnableToDrag)] call EFUNC(common,displayTextStructured); }; diff --git a/addons/dragging/functions/fnc_startDragLocal.sqf b/addons/dragging/functions/fnc_startDragLocal.sqf index b656c8ce5a..fe5f29fa61 100644 --- a/addons/dragging/functions/fnc_startDragLocal.sqf +++ b/addons/dragging/functions/fnc_startDragLocal.sqf @@ -31,6 +31,9 @@ if !(_target getVariable [QGVAR(ignoreWeightDrag), false]) then { // Exit if object weight is over global var value if (_weight > GETMVAR(ACE_maxWeightDrag,1E11)) exitWith { + // Release claim on object + [objNull, _target, true] call EFUNC(common,claim); + [LLSTRING(UnableToDrag)] call EFUNC(common,displayTextStructured); };