From 7696d9aa2ec81a729bd67ebce9c090810578fb21 Mon Sep 17 00:00:00 2001 From: Grim <69561145+LinkIsGrim@users.noreply.github.com> Date: Sun, 4 Feb 2024 06:09:15 -0300 Subject: [PATCH] Cargo - Fix object lock when failling to load a carried object (#9759) --- addons/cargo/functions/fnc_startLoadIn.sqf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/cargo/functions/fnc_startLoadIn.sqf b/addons/cargo/functions/fnc_startLoadIn.sqf index 83325b4cde..7212d89c22 100644 --- a/addons/cargo/functions/fnc_startLoadIn.sqf +++ b/addons/cargo/functions/fnc_startLoadIn.sqf @@ -64,6 +64,8 @@ if ([_item, _vehicle] call FUNC(canLoadItemIn)) then { [objNull, _item, true] call EFUNC(common,claim); + [[LSTRING(loadingFailed), [_item, true] call FUNC(getNameItem)], 3] call EFUNC(common,displayTextStructured); + // Fix cancelling loading a carried item if (!isNull attachedTo _item) then { detach _item; @@ -85,6 +87,9 @@ if ([_item, _vehicle] call FUNC(canLoadItemIn)) then { true // return } else { + // Unlock the object + [objNull, _item, true] call EFUNC(common,claim); + [[LSTRING(loadingFailed), [_item, true] call FUNC(getNameItem)], 3] call EFUNC(common,displayTextStructured); // Fix cancelling loading a carried item