(placeholder) commented whole init function

This commit is contained in:
Valmo Trindade
2024-09-08 00:44:40 -03:00
parent d2803ef694
commit 1d3a183975

View File

@@ -3,8 +3,7 @@ params [
["_units", [], [[]]], ["_units", [], [[]]],
["_activated", true, [true]] ["_activated", true, [true]]
]; ];
/*if (isServer && _activated) exitWith {
if (isServer && _activated) exitWith {
private _warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Connecting..."]; private _warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Connecting..."];
[[_warning, 1.5]] call CBA_fnc_notify; [[_warning, 1.5]] call CBA_fnc_notify;
@@ -33,47 +32,61 @@ if (isServer && _activated) exitWith {
if (isMultiplayer) then { if (isMultiplayer) then {
[{ [{
[{ [{
private _markers = [];
{ {
private _unit = _x; private _unit = _x;
_unit call armatak_fnc_postMarker; private _m = _unit call armatak_fnc_extract_info;
_unit call armatak_fnc_extract_drone_info; _markers append _m;
} forEach playableUnits; } forEach playableUnits;
{ {
private _drone = _x; private _drone = _x;
if (_drone getVariable "_atak_uav_connected") then { if (_drone getVariable "_atak_uav_connected") then {
_drone call armatak_fnc_postDroneMarker; private _m = _drone call armatak_fnc_extract_drone_info;
_markers append _m;
}; };
} forEach allUnitsUAV; } forEach allUnitsUAV;
private _i = 0;
private _toSend = [];
{
if _i == 10 then {
"armatak" callExtension ["sendMarkers", _toSend];
_toSend = [];
};
_toSend append _x;
_i = _i + 1;
} forEach _markers;
"armatak" callExtension ["sendMarkers", _toSend];
}, 1, []] call CBA_fnc_addPerFrameHandler; }, 1, []] call CBA_fnc_addPerFrameHandler;
}, [], 1] call CBA_fnc_waitAndExecute; }, [], 1] call CBA_fnc_waitAndExecute;
addMissionEventHandler ["MPEnded", {
{
private _unit = _x;
_unit call armatak_fnc_deleteMarker;
} forEach playableUnits;
{
private _drone = _x;
_drone call armatak_fnc_deleteMarker;
} forEach allUnitsUAV;
}];
} else { } else {
[{ [{
player call armatak_fnc_postMarker; private _markers = [];
{
private _unit = player;
private _m = _unit call armatak_fnc_extract_info;
_markers append _m;
};
{ {
private _drone = _x; private _drone = _x;
if (_drone getVariable "_atak_uav_connected") then { if (_drone getVariable "_atak_uav_connected") then {
_drone call armatak_fnc_postDroneMarker; private _m = _drone call armatak_fnc_extract_drone_info;
_markers append _m;
}; };
} forEach allUnitsUAV; } forEach allUnitsUAV;
}, 1, []] call CBA_fnc_addPerFrameHandler;
addMissionEventHandler ["Ended", { private _i = 0;
player call armatak_fnc_deleteMarker; private _toSend = [];
{ {
private _drone = _x; if _i == 10 then {
_drone call armatak_fnc_deleteMarker; "armatak" callExtension ["sendMarkers", _toSend];
} forEach allUnitsUAV; _toSend = [];
}];
}; };
}; _toSend append _x;
_i = _i + 1;
} forEach _markers;
"armatak" callExtension ["sendMarkers", _toSend];
}, 1, []] call CBA_fnc_addPerFrameHandler;
};
};
*/