mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
remove obsolete mine jip synch (#5895)
This commit is contained in:
parent
4319b79b45
commit
1a28d69b9e
@ -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 {
|
||||
|
@ -21,10 +21,6 @@ PREP_RECOMPILE_START;
|
||||
#include "XEH_PREP.hpp"
|
||||
PREP_RECOMPILE_END;
|
||||
|
||||
if (isServer) then {
|
||||
GVAR(explosivesOrientations) = []
|
||||
};
|
||||
|
||||
GVAR(detonationHandlers) = [];
|
||||
|
||||
ADDON = true;
|
||||
|
@ -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));
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user