From 9e6f624a68b5788585ffe5ddd115a7fad84bc316 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Tue, 23 Apr 2024 23:07:16 +0200 Subject: [PATCH] Cargo - Fix undefined variable and config entries (#9965) Cargo fixes --- addons/cargo/CfgVehicles.hpp | 4 ++-- addons/cargo/XEH_postInit.sqf | 2 +- addons/cargo/functions/fnc_initVehicle.sqf | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/cargo/CfgVehicles.hpp b/addons/cargo/CfgVehicles.hpp index 485a53d8f5..6f6a93e820 100644 --- a/addons/cargo/CfgVehicles.hpp +++ b/addons/cargo/CfgVehicles.hpp @@ -510,7 +510,7 @@ class CfgVehicles { }; GVAR(space) = 2; - GVAR(hasCargo) = 2; + GVAR(hasCargo) = 1; GVAR(size) = 3; GVAR(canLoad) = 1; @@ -524,7 +524,7 @@ class CfgVehicles { class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; }; GVAR(space) = 3; - GVAR(hasCargo) = 3; + GVAR(hasCargo) = 1; GVAR(size) = 3; GVAR(canLoad) = 1; diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index 94cb2afc87..f48849b50b 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -86,7 +86,7 @@ GVAR(vehicleAction) = [ GVAR(enable) && {alive _target} && {locked _target < 2} && - {(_target getVariable [QGVAR(hasCargo), getNumber (configOf _target >> QGVAR(hasCargo)) == 1])} && + {_target getVariable [QGVAR(hasCargo), getNumber (configOf _target >> QGVAR(hasCargo)) == 1]} && {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} && {[_player, _target] call EFUNC(interaction,canInteractWithVehicleCrew)} && {([_player, _target] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE} diff --git a/addons/cargo/functions/fnc_initVehicle.sqf b/addons/cargo/functions/fnc_initVehicle.sqf index 4ca004b94e..af80761fe0 100644 --- a/addons/cargo/functions/fnc_initVehicle.sqf +++ b/addons/cargo/functions/fnc_initVehicle.sqf @@ -23,7 +23,7 @@ private _config = configOf _vehicle; // If vehicle had space given to it via eden/public, then override config hasCargo setting private _hasCargoPublic = _vehicle getVariable QGVAR(hasCargo); -private _hasCargoPublicDefined = !isNil "_canLoadPublic"; +private _hasCargoPublicDefined = !isNil "_hasCargoPublic"; if (_hasCargoPublicDefined && {!(_hasCargoPublic isEqualType false)}) then { WARNING_4("%1[%2] - Variable %3 is %4 - Should be bool",_vehicle,_type,QGVAR(hasCargo),_hasCargoPublic);