Open Drofseh opened 6 years ago
Combined with the aforementioned issue, the setowner occasional information loss bug, and the necessity for shared team variables and counts between server + HC, I think the best solution for a HC mission is a separate branch.
Basically a different "core" that would involve changing many of the functions and init to be tailored to HC and having a customization\headlessspawn.sqf with an array of exported units intended to be run on the HC instead of using the ACEX module, which has the setowner issues.
The
settings.sqf
currently has two code blocks:isServer
which runs on any server, dedicated or not, and!isDedicated
which runs on everything that is not a dedicated server.Headless clients will execute the
!isDedicated
block, like a player client. This may cause a problem when a mission maker sets a view distance for the AI in theisServer
block, since the headless clients which control the AI will actually have their view distance set in the!isDedicated
block.I'm not sure what the best solution is, I don't think the HC should execute the same block as the server, since variable and functions contained there may not be appropriate for the HC.
Likewise having the HC execute the block meant for players is also not ideal, since the wrong viewdistance will be set, as will other code meant by the mission maker only for players.
A third code block could be added, that runs only on headless clients.
if (!hasInterface && !isDedicated) then { };