2016-05-30 16:37:03 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2016-10-26 22:16:31 +00:00
|
|
|
if (isServer) then {
|
2017-04-11 15:33:56 +00:00
|
|
|
GVAR(lastFragTime) = -1;
|
2024-03-28 18:57:23 +00:00
|
|
|
[QGVAR(frag_eh), LINKFUNC(frago)] call CBA_fnc_addEventHandler;
|
2016-05-30 16:37:03 +00:00
|
|
|
};
|
|
|
|
|
2021-10-11 20:48:30 +00:00
|
|
|
["CBA_settingsInitialized", {
|
2016-05-30 16:37:03 +00:00
|
|
|
if (!GVAR(enabled)) exitWith {};
|
|
|
|
|
|
|
|
// Register fire event handler
|
2016-12-01 17:01:55 +00:00
|
|
|
["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
|
|
|
|
2017-05-10 16:28:26 +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
|
|
|
|
2016-10-26 22:16:31 +00:00
|
|
|
// Cache for ammo type configs
|
2024-06-11 15:34:32 +00:00
|
|
|
GVAR(cacheRoundsTypesToTrack) = createHashMap;
|
2016-12-01 17:01:55 +00:00
|
|
|
|
2017-04-11 15:33:56 +00:00
|
|
|
|
|
|
|
// Debug stuff:
|
|
|
|
|
|
|
|
#ifdef DRAW_FRAG_INFO
|
|
|
|
[] call FUNC(dev_startTracing);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef DEBUG_MODE_FULL
|
2016-12-01 17:01:55 +00:00
|
|
|
[true, true, 30] call FUNC(dev_debugAmmo);
|
|
|
|
#endif
|