Hacking the BI respawn framework to support a spectator setting was intrusive and limiting. Instead of using a setting, I've opted to introduce a new respawn template that can be used within BI's respawn framework. The benefits of this approach are:
- Compatibility isn't a concern, that responsibility is shifted onto mission designers.
- Mission designers can use the functionality of the BI framework alongside the spectator system (combining templates, using different templates for different sides, etc.).
- If a custom respawn framework is used, then this doesn't change anything. Custom frameworks are still fully supported via the public functions provided.
- Remains simple to set up, just requires a description.ext edit
Seamlessly integrates the spectator system with the vanilla respawn framework when the onDeath setting is enabled. This commit makes a lot of changes:
- Edit BI functions used by the vanilla respawn framework to enable support for ace_spectator.
- Set spectator state is now tracked using a GVAR for the local player since using a unit won't be reliable all of the time. However unit is still marked for any filtering purposes.
- Instead of NV being used based on the sun to moon transition state by default, that functionality only takes place in the integrated system so that custom frameworks can do what they want.
- Seagull units are hidden when using framework integration since they're spawned by the engine with respawn type 1 and they just hang around undesirably