mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Update fnc_ai_reload.sqf
This commit is contained in:
parent
757710b002
commit
7fc4c42954
@ -20,13 +20,13 @@ TRACE_3("AI reload",_vehicle,_gunner,_instantReload);
|
||||
|
||||
// API, used for ai_switchMagazine
|
||||
private _forcedMag = _vehicle getVariable [QGVAR(forcedMag), ""];
|
||||
private _turretIndex = [_gunner] call EFUNC(common,getTurretIndex);
|
||||
if (_turretIndex isEqualTo []) then {
|
||||
_turretIndex = [0];
|
||||
private _turretPath = _vehicle unitTurret _gunner;
|
||||
if (_turretPath isEqualTo []) then {
|
||||
_turretPath = [0];
|
||||
};
|
||||
|
||||
// If this is called while CSW has ammo, unload mags in gunner's turret
|
||||
if (someAmmo _vehicle) then {[_vehicle, _turretIndex] call FUNC(unloadMagazines)};
|
||||
if (someAmmo _vehicle) then {[_vehicle, _turretPath] call FUNC(unloadMagazines)};
|
||||
|
||||
private _loadableMagazines = [_vehicle, _gunner, true] call FUNC(reload_getLoadableMagazines);
|
||||
if (_loadableMagazines isEqualTo []) exitWith {TRACE_1("could not find reloadable mag",_vehicle)};
|
||||
|
Loading…
Reference in New Issue
Block a user