diff --git a/addons/weaponselect/CfgEventHandlers.hpp b/addons/weaponselect/CfgEventHandlers.hpp index fd928fde2a..0cd959a047 100644 --- a/addons/weaponselect/CfgEventHandlers.hpp +++ b/addons/weaponselect/CfgEventHandlers.hpp @@ -10,11 +10,3 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; - -class Extended_FiredBIS_EventHandlers { - class CAManBase { - class GVAR(throwGrenade) { - clientFiredBIS = QUOTE(if (_this select 0 == ACE_player) then {_this call FUNC(throwGrenade)}); - }; - }; -}; diff --git a/addons/weaponselect/XEH_postInit.sqf b/addons/weaponselect/XEH_postInit.sqf index 450086aa91..87084ddf28 100644 --- a/addons/weaponselect/XEH_postInit.sqf +++ b/addons/weaponselect/XEH_postInit.sqf @@ -195,3 +195,7 @@ if (!hasInterface) exitWith {}; }, {false}, [10, [false, false, false]], false] call CBA_fnc_addKeybind; //9 Key + + +// Register fire event handler +["firedPlayer", DFUNC(throwGrenade)] call EFUNC(common,addEventHandler); diff --git a/addons/weaponselect/functions/fnc_throwGrenade.sqf b/addons/weaponselect/functions/fnc_throwGrenade.sqf index a99b06879b..3f55e02f51 100644 --- a/addons/weaponselect/functions/fnc_throwGrenade.sqf +++ b/addons/weaponselect/functions/fnc_throwGrenade.sqf @@ -1,15 +1,9 @@ /* * Author: commy2 - * Display Grenade information on grenade throw. + * Display Grenade information on grenade throw. Called from the unified fired EH only for the local player. * * 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", "", "", "", "_magazine"]; +//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 {};