mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 16:03:31 +00:00
fixed drone handler
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
params["_drone"];
|
params["_drone"];
|
||||||
|
|
||||||
private _atak_role = "a-f-A";
|
private _atak_role = "a-f-A";
|
||||||
private _atak_callsign = [_drone] call armatak_fnc_extract_unit_callsign;
|
private _atak_callsign = [_drone] call armatak_fnc_extract_marker_callsign;
|
||||||
|
|
||||||
switch (side _drone) do {
|
switch (side _drone) do {
|
||||||
case "WEST": {
|
case "WEST": {
|
||||||
@@ -25,4 +25,10 @@ switch (side _drone) do {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_pre_defined_role = _drone getVariable "_atak_group_role";
|
||||||
|
|
||||||
|
if (!isNil "_pre_defined_role") then {
|
||||||
|
_callsign = _pre_defined_role;
|
||||||
|
};
|
||||||
|
|
||||||
_cot = [_drone, _atak_role, _atak_callsign] call armatak_fnc_send_marker_cot;
|
_cot = [_drone, _atak_role, _atak_callsign] call armatak_fnc_send_marker_cot;
|
||||||
|
|||||||
@@ -49,15 +49,12 @@ if (isServer) exitWith {
|
|||||||
_atak_type = [_x] call armatak_fnc_extract_role;
|
_atak_type = [_x] call armatak_fnc_extract_role;
|
||||||
_callsign = [_x] call armatak_fnc_extract_marker_callsign;
|
_callsign = [_x] call armatak_fnc_extract_marker_callsign;
|
||||||
|
|
||||||
[_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot;
|
[_x, _atak_type, _callsign] call armatak_fnc_send_drone_cot;
|
||||||
};
|
|
||||||
};
|
|
||||||
if (unitIsUAV _x) then {
|
|
||||||
[_x] call armatak_fnc_send_drone_cot;
|
|
||||||
[_x] call armatak_fnc_send_digital_pointer_cot;
|
[_x] call armatak_fnc_send_digital_pointer_cot;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
} forEach GVAR(syncedUnits);
|
} forEach GVAR(syncedUnits);
|
||||||
}, 2, []] call CBA_fnc_addPerFrameHandler;
|
}, 0.5, []] call CBA_fnc_addPerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
true;
|
true;
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ _syncUnits = [];
|
|||||||
|
|
||||||
missionNamespace setVariable ["armatak_server_syncedUnits", _syncUnits];
|
missionNamespace setVariable ["armatak_server_syncedUnits", _syncUnits];
|
||||||
|
|
||||||
GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
|
GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
|
||||||
|
|
||||||
[{
|
[{
|
||||||
GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
|
GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -49,12 +49,15 @@ GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
|
|||||||
|
|
||||||
[_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot;
|
[_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot;
|
||||||
};
|
};
|
||||||
};
|
case ((_objectType select 0) == "VehicleAutonomous"): {
|
||||||
if (unitIsUAV _x) then {
|
_atak_type = [_x] call armatak_fnc_extract_role;
|
||||||
[_x] call armatak_fnc_send_drone_cot;
|
_callsign = [_x] call armatak_fnc_extract_marker_callsign;
|
||||||
|
|
||||||
|
[_x, _atak_type, _callsign] call armatak_fnc_send_drone_cot;
|
||||||
[_x] call armatak_fnc_send_digital_pointer_cot;
|
[_x] call armatak_fnc_send_digital_pointer_cot;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
} forEach GVAR(syncedUnits);
|
} forEach GVAR(syncedUnits);
|
||||||
}, 2, []] call CBA_fnc_addPerFrameHandler;
|
}, 2, []] call CBA_fnc_addPerFrameHandler;
|
||||||
deleteVehicle _logic;
|
deleteVehicle _logic;
|
||||||
closeDialog 1;
|
closeDialog 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user