mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
FCS - Skip adding firedEH until needed (#6965)
This commit is contained in:
parent
0d7709673a
commit
2cfe7ebd0c
@ -15,13 +15,9 @@ if (!hasInterface) exitWith {};
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// Register fire event handler
|
||||
["ace_firedPlayerVehicle", DFUNC(firedEH)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerVehicleNonLocal", DFUNC(firedEH)] call CBA_fnc_addEventHandler;
|
||||
|
||||
// Register event for global updates
|
||||
[QGVAR(forceUpdate), {[ACE_player] call FUNC(onForceUpdate)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
call compile preprocessFileLineNumbers QPATHTOF(functions\dev_debugConfigs.sqf);
|
||||
call compile preprocessFileLineNumbers QPATHTOF(dev\test_debugConfigs.sqf);
|
||||
#endif
|
||||
|
@ -21,6 +21,13 @@ params ["_vehicle"];
|
||||
private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _x] call EFUNC(common,getTurretConfigPath);
|
||||
|
||||
if (getNumber (_turretConfig >> QGVAR(Enabled)) == 1) then {
|
||||
if (missionNamespace getVariable [QGVAR(needToAddFiredEH), true]) then {
|
||||
["ace_firedPlayerVehicle", LINKFUNC(firedEH)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerVehicleNonLocal", LINKFUNC(firedEH)] call CBA_fnc_addEventHandler;
|
||||
GVAR(needToAddFiredEH) = false;
|
||||
TRACE_1("Registered fired event handlers for all vehicles",GVAR(needToAddFiredEH));
|
||||
};
|
||||
|
||||
_vehicle setVariable [format ["%1_%2", QGVAR(Distance), _x], 0, true];
|
||||
_vehicle setVariable [format ["%1_%2", QGVAR(Magazines), _x], [], true];
|
||||
_vehicle setVariable [format ["%1_%2", QGVAR(Elevation), _x], [], true];
|
||||
|
Loading…
Reference in New Issue
Block a user