Headless client sync vs ACEX HC
TMF modules Garrison and Wavespawner (something else?) support headless client via syncing given module with HC game logic. Since 1Tac started using ACEX headless client load balancer though, synced modules misbehave - "template" units are never deleted and (afaik) new units are not spawned. I suggest either making it so HC sync is disabled if ACEX load balancer is detected (preferable) or complete removal of "sync with HC" functionality.
this setVariable ["acex_headless_blacklist", true]; could probably be added to units if a HC is synced.
That's one way though from what I'm seeing if HC is synced, function simply reruns itself on that headless instance and new call to function doesn't "know" it's not the main server. Of course parameters can be added.
From what I'm seeing though, checking if ACEX HC is enabled is as simple as checking acex_headless_enabled variable? In this case whole if (headless synced) check can be bypassed (ACEX headless seems to be better implementation anyways)
It is better to spawn the units directly on headless clients, as it saves a fair chunk of network traffic. Sometimes when units are transferred, they also turn naked and/or have their weapons removed.