Cargo - Fix undefined variable (#9909)

Update fnc_initVehicle.sqf
This commit is contained in:
johnb432 2024-04-02 22:46:14 +02:00 committed by GitHub
parent 0375d0dae6
commit cc3fbc5f3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,11 +22,11 @@ private _type = typeOf _vehicle;
private _config = configOf _vehicle; private _config = configOf _vehicle;
// If vehicle had space given to it via eden/public, then override config hasCargo setting // 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"; private _hasCargoPublicDefined = !isNil "_canLoadPublic";
if (_hasCargoPublicDefined && {!(_hasCargoPublic isEqualType false)}) then { 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; private _hasCargoConfig = getNumber (_config >> QGVAR(hasCargo)) == 1;