remove obsolete mine jip synch (#5895)

This commit is contained in:
commy2 2017-12-12 18:01:47 +01:00 committed by jonpas
parent 4319b79b45
commit 1a28d69b9e
3 changed files with 0 additions and 46 deletions

View File

@ -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 {

View File

@ -21,10 +21,6 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
if (isServer) then {
GVAR(explosivesOrientations) = []
};
GVAR(detonationHandlers) = [];
ADDON = true;

View File

@ -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));
};