mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fix derp
This commit is contained in:
parent
87586459bc
commit
ef93a61e13
@ -17,13 +17,4 @@ TRACE_3("getInEH:",_vehicle,_role,_gunner);
|
||||
if ((!local _gunner) || {[_gunner] call EFUNC(common,isPlayer)}) exitWith {};
|
||||
if (someAmmo _vehicle) exitWith {};
|
||||
|
||||
// turret can be empty when AI is forcefully moved to the vehicle
|
||||
if (_turret isEqualTo []) then {
|
||||
_turret = (assignedVehicleRole _gunner) select 1;
|
||||
};
|
||||
|
||||
// this doesn't handle multi-weapon turrets, need a "turretWeapon" event or a PFH to do that
|
||||
private _weapon = (_vehicle weaponsTurret _turret) select 0;
|
||||
TRACE_4("need ammo",someAmmo _vehicle,magazinesAllTurrets _vehicle,_turret,_weapon);
|
||||
|
||||
[_vehicle, _gunner, _weapon] call FUNC(ai_reload);
|
||||
[_vehicle, _gunner] call FUNC(ai_reload);
|
||||
|
@ -21,9 +21,13 @@ if (_loadableMagazines isEqualTo []) exitWith {TRACE_1("could not find reloadabl
|
||||
|
||||
// API, to be used by artillerytables
|
||||
private _forcedMag = _vehicle getVariable [QGVAR(forcedMag), ""];
|
||||
private _turretIndex = [_gunner] call EFUNC(common,getTurretIndex);
|
||||
if (_turretIndex isEqualTo []) then {
|
||||
_turretIndex = [0];
|
||||
};
|
||||
|
||||
// If this is called while CSW has ammo, unload mags in gunner's turret
|
||||
if (someAmmo _vehicle) then {[_vehicle, [_gunner] call EFUNC(common,getTurretIndex)] call FUNC(unloadMagazines)};
|
||||
if (someAmmo _vehicle) then {[_vehicle, _turretIndex] call FUNC(unloadMagazines)};
|
||||
|
||||
private _bestAmmo = 0;
|
||||
private _magazineInfo = [];
|
||||
|
Loading…
Reference in New Issue
Block a user