ACE3/addons/headless/functions/fnc_handleConnectHC.sqf
johnb432 0d401b2664
Headless - Code optimisation (#9873)
* Headless optimisations

* Swapped blacklist for unitIsUAV check

* Moved UAV check

* Update addons/headless/functions/fnc_transferGroups.sqf

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* Update addons/headless/functions/fnc_transferGroups.sqf

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* Update fnc_transferGroups.sqf

---------

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2024-04-04 08:01:12 -03:00

33 lines
702 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: Jonpas
* Registers connected Headless Client for use.
*
* Arguments:
* 0: Headless Client <OBJECT>
*
* Return Value:
* None
*
* Example:
* [headlessClient] call ace_headless_fnc_handleConnectHC
*
* Public: No
*/
params ["_headlessClient"];
// Exit if HC already registered
// No need to check if distribution or end mission enabled, as if disabled this will never run
if (GVAR(headlessClients) pushBackUnique _headlessClient == -1) exitWith {};
if (XGVAR(log)) then {
INFO_1("Registered HC: %1",_headlessClient);
};
// Exit if AI distribution is disabled
if (!XGVAR(enabled)) exitWith {};
// Rebalance
[true] call FUNC(rebalance);