Moved event to preInit

This commit is contained in:
johnb432 2024-03-17 13:41:09 +01:00
parent ab51d8f8b0
commit 04a3ba8bb4
2 changed files with 9 additions and 13 deletions

View File

@ -1,19 +1,9 @@
#include "script_component.hpp"
#ifdef DEBUG_MODE_DRAW
[
"CBA_settingsInitialized",
{
if (isServer) then {
call FUNC(initMaterialCache);
[
QEGVAR(common,setShotParents),
{
(_this#0) setVariable [QGVAR(shotParent), [_this#1, _this#2]];
}
] call CBA_fnc_addEventHandler;
};
#ifdef DEBUG_MODE_DRAW
[QGVAR(dev_clearTraces), LINKFUNC(dev_clearTraces)] call CBA_fnc_addEventHandler;
if (!hasInterface) exitWith {};
@ -49,9 +39,9 @@
] call EFUNC(interact_menu,addActionToClass);
}
] call CBA_fnc_addEventHandler;
#endif
}
] call CBA_fnc_addEventHandler;
#endif
#ifdef LOG_FRAG_INFO
[true, true, 30] call FUNC(dev_debugAmmo);

View File

@ -6,7 +6,8 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
GVAR(spallMaterialCache) = createHashMap;
call FUNC(initMaterialCache);
GVAR(spallInfoCache) = createHashMap;
GVAR(shouldSpallCache) = createHashMap;
GVAR(nextSpallAllowTime) = -1;
@ -21,8 +22,13 @@ GVAR(dev_trackLines) = createHashMap;
GVAR(dev_hitBoxes) = createHashMap;
GVAR(dev_eventSpheres) = [];
GVAR(dev_drawPFEH) = -1;
#ifdef DEBUG_MODE_DRAW
#include "initSettingsDebug.inc.sqf"
#endif
if (isServer) then {
[QEGVAR(common,setShotParents), {(_this#0) setVariable [QGVAR(shotParent), [_this#1, _this#2]]}] call CBA_fnc_addEventHandler;
};
ADDON = true;