Merge pull request #3948 from acemod/zeusScriptedXEH

Improve zeus auto-add XEH behaviour
This commit is contained in:
Glowbal 2016-06-18 19:53:56 +02:00 committed by GitHub
commit c7bb1ee9a4
3 changed files with 7 additions and 13 deletions

View File

@ -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));
};
};
};

View File

@ -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);

View File

@ -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 {};
[{