mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Changed mortar initialization to getIn; Zeus-controlled AI will not trigger the init.
This commit is contained in:
parent
85270e4521
commit
b4cb5c2ba7
@ -22,3 +22,10 @@ class Extended_InitPost_EventHandlers {
|
||||
};
|
||||
};
|
||||
};
|
||||
class Extended_GetIn_EventHandlers {
|
||||
class Mortar_01_base_F {
|
||||
class ADDON {
|
||||
getIn = QUOTE(_this call COMPILE_FILE(XEH_getIn));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
15
addons/mk6mortar/XEH_getIn.sqf
Normal file
15
addons/mk6mortar/XEH_getIn.sqf
Normal file
@ -0,0 +1,15 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_mortar","_crewPosition","_unit","_turretPath"];
|
||||
TRACE_4("",_mortar,_crewPosition,_unit,_turretPath);
|
||||
|
||||
if (_unit != player || {_crewPosition != "GUNNER"}) exitWith {LOG("Exit")};
|
||||
|
||||
if (!EGVAR(common,settingsInitFinished)) exitWith {
|
||||
EGVAR(common,runAtSettingsInitialized) pushBack [{
|
||||
if (GVAR(useAmmoHandling)) then {
|
||||
_this call FUNC(mortarInit);
|
||||
};
|
||||
}, _mortar];
|
||||
};
|
||||
_mortar call FUNC(mortarInit);
|
@ -1,5 +1,10 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_mortar"];
|
||||
TRACE_1("",_mortar);
|
||||
|
||||
if (gunner _mortar != player) exitWith {LOG("Exit")};
|
||||
|
||||
if (!EGVAR(common,settingsInitFinished)) exitWith {
|
||||
EGVAR(common,runAtSettingsInitialized) pushBack [{
|
||||
if (GVAR(useAmmoHandling)) then {
|
||||
|
@ -23,11 +23,11 @@
|
||||
|
||||
PARAMS_7(_vehicle,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
|
||||
|
||||
if (GVAR(useAmmoHandling)) then {
|
||||
if !(_vehicle getVariable [QGVAR(exclude),false]) then {
|
||||
if (GVAR(useAmmoHandling) && {_vehicle getVariable [QGVAR(initialized),false] && !(_vehicle getVariable [QGVAR(exclude),false])}) then {
|
||||
// if !(_vehicle getVariable [QGVAR(exclude),false]) then {
|
||||
_vehicle removeMagazineGlobal (_vehicle magazinesTurret [0] select 0);
|
||||
TRACE_1("",_vehicle magazinesTurret [0]);
|
||||
};
|
||||
// };
|
||||
};
|
||||
|
||||
if (!GVAR(airResistanceEnabled)) exitWith {};
|
||||
|
@ -18,7 +18,7 @@
|
||||
params ["_mortar"];
|
||||
private ["_newWeapon","_currentWeapon"];
|
||||
|
||||
if (_mortar getVariable [QGVAR(initialized),false] || _mortar getVariable [QGVAR(exclude),false]) exitWith {};
|
||||
if (_mortar getVariable [QGVAR(initialized),false] || _mortar getVariable [QGVAR(exclude),false]) exitWith {TRACE_1("Exit",_mortar)};
|
||||
|
||||
// Remove all magazines
|
||||
if (count magazines _mortar > 0) then {
|
||||
|
Loading…
Reference in New Issue
Block a user