Added addRouterEntities and removeRouterEntites instead of manually adding entites to the CoT Router array

This commit is contained in:
2026-05-25 19:48:51 -03:00
parent 37aa51f8c2
commit e53ba2ae0f
4 changed files with 82 additions and 0 deletions
@@ -0,0 +1,25 @@
#include "..\script_component.hpp"
/*
* Author: Valmo, Codex
* Replaces the server-side CoT router entity list with a de-duplicated list.
*
* Arguments:
* 0: Entities to publish through the CoT router <ARRAY>
*
* Return Value:
* Current routed entities <ARRAY>
*
* Public: Yes
*/
params [
["_entities", [], [[]]]
];
private _routed = _entities arrayIntersect _entities;
_routed = _routed select {!isNull _x && {alive _x}};
missionNamespace setVariable ["armatak_server_syncedUnits", _routed, true];
GVAR(syncedUnits) = _routed;
_routed