FCS - FCSMags could be undefined, and cause probs

Shooting the B_apc_tracked_01_rcws_F, veh variables aren't defined and
cause problems downstream.

14:40:58 Error in expression <ir select 1) * _r,
_l
];
_vel = _vdir
vectorMultiply _adjustSpeed + vectorMagn>
14:40:58   Error position: <vectorMultiply _adjustSpeed + vectorMagn>
14:40:58   Error Type Number,Not a Number, expected Number
14:40:58 File
z\ace\addons\common\functions\fnc_changeProjectileDirection.sqf, line 42
This commit is contained in:
PabstMirror 2015-03-03 15:09:38 -06:00
parent 39be8ffbe7
commit 9d4a0be0db

View File

@ -30,7 +30,7 @@ if !([_gunner] call EFUNC(common,isPlayer)) exitWith {};
private ["_FCSMagazines", "_FCSElevation", "_offset"];
_FCSMagazines = _vehicle getVariable format ["%1_%2", QGVAR(Magazines), _turret];
_FCSMagazines = _vehicle getVariable [(format ["%1_%2", QGVAR(Magazines), _turret]), []];
_FCSElevation = _vehicle getVariable format ["%1_%2", QGVAR(Elevation), _turret];
if !(_magazine in _FCSMagazines) exitWith {};