2015-07-22 08:04:54 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-09-11 14:58:26 +00:00
|
|
|
if (!hasInterface) exitWith {};
|
2015-07-22 08:04:54 +00:00
|
|
|
|
|
|
|
GVAR(trackedBullets) = [];
|
|
|
|
|
2021-10-11 20:48:30 +00:00
|
|
|
["CBA_settingsInitialized", {
|
2015-07-22 08:04:54 +00:00
|
|
|
//If not enabled, dont't add PFEH
|
|
|
|
if (!GVAR(enabled)) exitWith {};
|
|
|
|
|
2016-02-06 21:36:20 +00:00
|
|
|
// Register fire event handler
|
2024-03-28 18:57:23 +00:00
|
|
|
["ace_firedPlayer", LINKFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
|
|
|
["ace_firedPlayerNonLocal", LINKFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
2016-02-06 21:36:20 +00:00
|
|
|
|
|
|
|
if (GVAR(vehicleEnabled)) then {
|
2024-03-28 18:57:23 +00:00
|
|
|
["ace_firedPlayerVehicle", LINKFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
|
|
|
["ace_firedPlayerVehicleNonLocal", LINKFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
2016-02-06 21:36:20 +00:00
|
|
|
};
|
|
|
|
|
2015-07-22 08:04:54 +00:00
|
|
|
[] call FUNC(updateTrajectoryPFH);
|
|
|
|
|
2016-05-22 15:29:05 +00:00
|
|
|
}] call CBA_fnc_addEventHandler;
|