This commit is contained in:
Sotirios Pupakis
2024-06-03 22:37:46 +02:00
parent 95f2aee314
commit bfba85e8f5
3 changed files with 14 additions and 5 deletions

View File

@@ -53,3 +53,4 @@ GVAR(towingList) = [
_arty animateSource ["rest_rotation_source", _offRot];
_arty setPosWorld getPosWorld _arty;
}] call CBA_fnc_addEventHandler;

View File

@@ -7,8 +7,7 @@
ADDON = true;
[
QGVAR(loadShell),
[QGVAR(loadShell),
{
params ["_arty", "_shell", "_turret"];
@@ -22,6 +21,17 @@ ADDON = true;
}
] call CBA_fnc_addEventHandler;
[QGVAR(unloadShell),
{
params ["_arty", "_turret"];
private _mags = _arty magazinesTurret [_turret];
{
_arty removeMagazinesTurret [_x, [_turret]];
} forEach _mags;
}
] call CBA_fnc_addEventHandler;
[LLSTRING(name), "RotateRight", [LLSTRING(rotright), LLSTRING(rotright_desc)], {
if (vehicle player == player) exitWith {};

View File

@@ -29,9 +29,7 @@ params ["_arty", "_turret"];
if !([_arty] call FUNC(canUnload)) exitWith {};
private _mags = _arty magazinesTurret [_turret];
{
_arty removeMagazinesTurret [_x, [_turret]];
} forEach _mags;
[QGVAR(unloadShell), [_arty, _turret], _arty, [-1]] call CBA_fnc_turretEvent;
private _veh = "";