ACE3/addons/frag/XEH_postInit.sqf

33 lines
918 B
Plaintext
Raw Normal View History

2016-05-30 16:37:03 +00:00
#include "script_component.hpp"
if (isServer) then {
GVAR(lastFragTime) = -1;
[QGVAR(frag_eh), LINKFUNC(frago)] call CBA_fnc_addEventHandler;
2016-05-30 16:37:03 +00:00
};
["CBA_settingsInitialized", {
2016-05-30 16:37:03 +00:00
if (!GVAR(enabled)) exitWith {};
// Register fire event handler
["ace_firedPlayer", LINKFUNC(fired)] call CBA_fnc_addEventHandler;
["ace_firedNonPlayer", LINKFUNC(fired)] call CBA_fnc_addEventHandler;
["ace_firedPlayerVehicle", LINKFUNC(fired)] call CBA_fnc_addEventHandler;
["ace_firedNonPlayerVehicle", LINKFUNC(fired)] call CBA_fnc_addEventHandler;
2016-05-30 16:37:03 +00:00
addMissionEventHandler ["EachFrame", {call FUNC(masterPFH)}];
2016-06-09 12:24:45 +00:00
}] call CBA_fnc_addEventHandler;
2016-05-30 16:37:03 +00:00
// Cache for ammo type configs
GVAR(cacheRoundsTypesToTrack) = [false] call CBA_fnc_createNamespace;
// Debug stuff:
#ifdef DRAW_FRAG_INFO
[] call FUNC(dev_startTracing);
#endif
#ifdef DEBUG_MODE_FULL
[true, true, 30] call FUNC(dev_debugAmmo);
#endif