mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #3948 from acemod/zeusScriptedXEH
Improve zeus auto-add XEH behaviour
This commit is contained in:
commit
c7bb1ee9a4
@ -16,11 +16,3 @@ class Extended_PostInit_EventHandlers {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_InitPost_EventHandlers {
|
||||
class AllVehicles {
|
||||
class ADDON {
|
||||
serverInit = QUOTE(call FUNC(addObjectToCurator));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,5 +1,12 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
["ace_settingsInitialized",{
|
||||
// Only add an InitPost EH if setting is enabled (and apply retroactively)
|
||||
if (isServer && GVAR(autoAddObjects)) then {
|
||||
["AllVehicles", "InitPost", FUNC(addObjectToCurator), true, [], true] call CBA_fnc_addClassEventHandler;
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// Global skill module PVs values for persistence, just listen for the PV
|
||||
QGVAR(GlobalSkillAI) addPublicVariableEventHandler FUNC(moduleGlobalSetSkill);
|
||||
|
||||
|
@ -15,11 +15,6 @@
|
||||
|
||||
params ["_object"];
|
||||
|
||||
if !(EGVAR(common,settingsInitFinished)) exitWith {
|
||||
TRACE_1("pushing to runAtSettingsInitialized", _this);
|
||||
EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(addObjectToCurator), _this];
|
||||
};
|
||||
|
||||
if (!(_object getVariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitWith {};
|
||||
|
||||
[{
|
||||
|
Loading…
Reference in New Issue
Block a user