Skip to content

Commit

Permalink
Cargo - Fix undefined variable (#9909)
Browse files Browse the repository at this point in the history
Update fnc_initVehicle.sqf
  • Loading branch information
johnb432 authored Apr 2, 2024
1 parent 0375d0d commit cc3fbc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/cargo/functions/fnc_initVehicle.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ private _type = typeOf _vehicle;
private _config = configOf _vehicle;

// If vehicle had space given to it via eden/public, then override config hasCargo setting
private _hasCargoPublic = _item getVariable QGVAR(hasCargo);
private _hasCargoPublic = _vehicle getVariable QGVAR(hasCargo);
private _hasCargoPublicDefined = !isNil "_canLoadPublic";

if (_hasCargoPublicDefined && {!(_hasCargoPublic isEqualType false)}) then {
WARNING_4("%1[%2] - Variable %3 is %4 - Should be bool",_item,_type,QGVAR(hasCargo),_hasCargoPublic);
WARNING_4("%1[%2] - Variable %3 is %4 - Should be bool",_vehicle,_type,QGVAR(hasCargo),_hasCargoPublic);
};

private _hasCargoConfig = getNumber (_config >> QGVAR(hasCargo)) == 1;
Expand Down

0 comments on commit cc3fbc5

Please sign in to comment.