Cargo - Fix object lock when failling to load a carried object (#9759)

This commit is contained in:
Grim 2024-02-04 06:09:15 -03:00 committed by GitHub
parent a97a8dbb73
commit 7696d9aa2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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