Cargo - Fix undefined variable and config entries (#9965)

Cargo fixes
This commit is contained in:
johnb432 2024-04-23 23:07:16 +02:00 committed by GitHub
parent a0e4f09555
commit 9e6f624a68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

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

View File

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

View File

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