diff --git a/addons/goggles/functions/fnc_handleFired.sqf b/addons/goggles/functions/fnc_handleFired.sqf index 23a1b66f48..dcfcc51bec 100644 --- a/addons/goggles/functions/fnc_handleFired.sqf +++ b/addons/goggles/functions/fnc_handleFired.sqf @@ -3,8 +3,7 @@ * Determines whether to place dust on the goggles, based on calibre of weapon fired and other requirements. Called from the unified fired EH only for the local player. * * Arguments: - * 0: Unit - * 1: Weapon + * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: * Function is handled? diff --git a/addons/grenades/CfgEventHandlers.hpp b/addons/grenades/CfgEventHandlers.hpp index d93f8469bc..0cd959a047 100644 --- a/addons/grenades/CfgEventHandlers.hpp +++ b/addons/grenades/CfgEventHandlers.hpp @@ -10,11 +10,3 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; - -class Extended_FiredBIS_EventHandlers { - class CAManBase { - class ADDON { - firedBIS = QUOTE(_this call FUNC(throwGrenade)); - }; - }; -}; diff --git a/addons/grenades/XEH_postInit.sqf b/addons/grenades/XEH_postInit.sqf index 54c2b06e8b..38945ccc11 100644 --- a/addons/grenades/XEH_postInit.sqf +++ b/addons/grenades/XEH_postInit.sqf @@ -22,3 +22,9 @@ GVAR(flashbangPPEffectCC) ppEffectForceInNVG true; }, {false}, [9, [false, false, false]], false] call CBA_fnc_addKeybind; //8 Key + + +// Register fire event handler +["firedPlayer", DFUNC(throwGrenade)] call EFUNC(common,addEventHandler); +["firedPlayerNonLocal", DFUNC(throwGrenade)] call EFUNC(common,addEventHandler); +["firedNonPlayer", DFUNC(throwGrenade)] call EFUNC(common,addEventHandler); diff --git a/addons/grenades/functions/fnc_throwGrenade.sqf b/addons/grenades/functions/fnc_throwGrenade.sqf index 1d7d470b80..284c573c2e 100644 --- a/addons/grenades/functions/fnc_throwGrenade.sqf +++ b/addons/grenades/functions/fnc_throwGrenade.sqf @@ -1,15 +1,9 @@ /* * Author: commy2 - * Adjust the grenades throwing direction and speed to the selected throwing mode. + * Adjust the grenades throwing direction and speed to the selected throwing mode. Called from the unified fired EH only for CAManBase * * Arguments: - * 0: unit - Object the event handler is assigned to - * 1: weapon - Fired weapon - * 2: muzzle - Muzzle that was used - * 3: mode - Current mode of the fired weapon - * 4: ammo - Ammo used - * 5: magazine - magazine name which was used - * 6: projectile - Object of the projectile that was shot + * None. Parameters inherited from EFUNC(common,firedEH) * * Return Value: * None @@ -21,7 +15,8 @@ */ #include "script_component.hpp" -params ["_unit", "_weapon", "", "", "_ammo", "", "_projectile"]; +//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; +TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); if (_weapon != "Throw") exitWith {};