diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf index 706a11d629..d98064cfe1 100644 --- a/addons/explosives/XEH_postInit.sqf +++ b/addons/explosives/XEH_postInit.sqf @@ -41,18 +41,6 @@ if (isServer) then { TRACE_1("Knocked Out, Doing Deadman", _unit); [_unit] call FUNC(onIncapacitated); }] call CBA_fnc_addEventHandler; - - [QGVAR(sendOrientations), { - params ["_owner"]; - TRACE_1("sendOrientations received:",_owner); - // Filter the array before sending it - GVAR(explosivesOrientations) = GVAR(explosivesOrientations) select { - _x params ["_explosive"]; - (!isNull _explosive && {alive _explosive}) - }; - TRACE_1("orientationsSent sent:",GVAR(explosivesOrientations)); - [QGVAR(orientationsSent), [GVAR(explosivesOrientations)], _owner] call CBA_fnc_ownerEvent; - }] call CBA_fnc_addEventHandler; }; if (!hasInterface) exitWith {}; @@ -62,24 +50,6 @@ GVAR(Setup) = objNull; GVAR(pfeh_running) = false; GVAR(CurrentSpeedDial) = 0; -// In case we are a JIP client, ask the server for orientation of any previously -// placed mine. -if (didJIP) then { - [QGVAR(orientationsSent), { - params ["_explosivesOrientations"]; - TRACE_1("orientationsSent received:",_explosivesOrientations); - { - _x params ["_explosive","_direction","_pitch"]; - TRACE_3("orientation set:",_explosive,_direction,_pitch); - [_explosive, _direction, _pitch] call FUNC(setPosition); - } forEach _explosivesOrientations; - }] call CBA_fnc_addEventHandler; - - // Create a logic to get the client ID - TRACE_1("sendOrientations sent:",CBA_clientID); - [QGVAR(sendOrientations), CBA_clientID] call CBA_fnc_serverEvent; -}; - ["ace_interactMenuOpened", { //Cancel placement if interact menu opened if (GVAR(pfeh_running)) then { diff --git a/addons/explosives/XEH_preInit.sqf b/addons/explosives/XEH_preInit.sqf index 3a4d9a5aea..969b00e784 100644 --- a/addons/explosives/XEH_preInit.sqf +++ b/addons/explosives/XEH_preInit.sqf @@ -21,10 +21,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; -if (isServer) then { - GVAR(explosivesOrientations) = [] -}; - GVAR(detonationHandlers) = []; ADDON = true; diff --git a/addons/explosives/functions/fnc_setPosition.sqf b/addons/explosives/functions/fnc_setPosition.sqf index 430f926138..b19e63ff5a 100644 --- a/addons/explosives/functions/fnc_setPosition.sqf +++ b/addons/explosives/functions/fnc_setPosition.sqf @@ -29,15 +29,3 @@ if (isNull (attachedTo _explosive)) then { //Attaching to a vehicle (dirAndUp based on vehicle) _explosive setVectorDirAndUp [[0,0,1],[(sin _direction),(cos _direction),0]]; }; - -if (isServer) then { - // Store the orientation to broadcast it later to JIP players - GVAR(explosivesOrientations) pushBack [_explosive, _direction, _pitch]; - - // This is a good time to filter the array and remove explosives that no longer exist - GVAR(explosivesOrientations) = GVAR(explosivesOrientations) select { - _x params ["_explosive"]; - (!isNull _explosive && {alive _explosive}) - }; - TRACE_1("setPosition",GVAR(explosivesOrientations)); -};