mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
use ownerEvent instead of game logics
This commit is contained in:
parent
d234fd33a0
commit
4319b79b45
@ -43,15 +43,15 @@ if (isServer) then {
|
|||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
[QGVAR(sendOrientations), {
|
[QGVAR(sendOrientations), {
|
||||||
params ["_logic"];
|
params ["_owner"];
|
||||||
TRACE_1("sendOrientations received:",_logic);
|
TRACE_1("sendOrientations received:",_owner);
|
||||||
// Filter the array before sending it
|
// Filter the array before sending it
|
||||||
GVAR(explosivesOrientations) = GVAR(explosivesOrientations) select {
|
GVAR(explosivesOrientations) = GVAR(explosivesOrientations) select {
|
||||||
_x params ["_explosive"];
|
_x params ["_explosive"];
|
||||||
(!isNull _explosive && {alive _explosive})
|
(!isNull _explosive && {alive _explosive})
|
||||||
};
|
};
|
||||||
TRACE_1("orientationsSent sent:",GVAR(explosivesOrientations));
|
TRACE_1("orientationsSent sent:",GVAR(explosivesOrientations));
|
||||||
[QGVAR(orientationsSent), [GVAR(explosivesOrientations)], _logic] call CBA_fnc_targetEvent;
|
[QGVAR(orientationsSent), [GVAR(explosivesOrientations)], _owner] call CBA_fnc_ownerEvent;
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -73,14 +73,11 @@ if (didJIP) then {
|
|||||||
TRACE_3("orientation set:",_explosive,_direction,_pitch);
|
TRACE_3("orientation set:",_explosive,_direction,_pitch);
|
||||||
[_explosive, _direction, _pitch] call FUNC(setPosition);
|
[_explosive, _direction, _pitch] call FUNC(setPosition);
|
||||||
} forEach _explosivesOrientations;
|
} forEach _explosivesOrientations;
|
||||||
deleteVehicle GVAR(localLogic);
|
|
||||||
GVAR(localLogic) = nil;
|
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
// Create a logic to get the client ID
|
// Create a logic to get the client ID
|
||||||
GVAR(localLogic) = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit ["Logic", [0,0,0], [], 0, "NONE"];
|
TRACE_1("sendOrientations sent:",CBA_clientID);
|
||||||
TRACE_1("sendOrientations sent:",GVAR(localLogic));
|
[QGVAR(sendOrientations), CBA_clientID] call CBA_fnc_serverEvent;
|
||||||
[QGVAR(sendOrientations), [GVAR(localLogic)]] call CBA_fnc_serverEvent;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
["ace_interactMenuOpened", {
|
["ace_interactMenuOpened", {
|
||||||
|
@ -9,8 +9,7 @@
|
|||||||
|
|
||||||
// request marker data for JIP
|
// request marker data for JIP
|
||||||
if (isMultiplayer && {!isServer} && {hasInterface}) then {
|
if (isMultiplayer && {!isServer} && {hasInterface}) then {
|
||||||
GVAR(localLogic) = (createGroup sideLogic) createUnit ["Logic", [0,0,0], [], 0, "NONE"];
|
[QGVAR(sendMarkersJIP), CBA_clientID] call CBA_fnc_serverEvent;
|
||||||
[QGVAR(sendMarkersJIP), [GVAR(localLogic)]] call CBA_fnc_serverEvent;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GVAR(mapDisplaysWithDrawEHs) = [];
|
GVAR(mapDisplaysWithDrawEHs) = [];
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_logic"];
|
params ["_owner"];
|
||||||
TRACE_1("params",_logic);
|
TRACE_1("params",_owner);
|
||||||
|
|
||||||
[
|
[
|
||||||
QGVAR(setMarkerJIP),
|
QGVAR(setMarkerJIP),
|
||||||
[GETGVAR(allMapMarkers,[]), GETGVAR(allMapMarkersProperties,[])],
|
[GETGVAR(allMapMarkers,[]), GETGVAR(allMapMarkersProperties,[])],
|
||||||
[_logic]
|
_owner
|
||||||
] call CBA_fnc_targetEvent;
|
] call CBA_fnc_ownerEvent;
|
||||||
|
@ -50,8 +50,3 @@ TRACE_3("params",_allMapMarkers,_allMapMarkersProperties);
|
|||||||
};
|
};
|
||||||
false
|
false
|
||||||
} count allMapMarkers;
|
} count allMapMarkers;
|
||||||
|
|
||||||
private _group = group GVAR(localLogic);
|
|
||||||
deleteVehicle GVAR(localLogic);
|
|
||||||
GVAR(localLogic) = nil;
|
|
||||||
deleteGroup _group;
|
|
||||||
|
Loading…
Reference in New Issue
Block a user