This trait uses the new interface to register with the GpsWatcher to get notified when the GPS state changes. It needs to register as if the actor is destroyed, the GpsWatcher can no longer query actors in the world to get the trait. This is no good as the trait needs to perform actions after the death of its parent actor.
When the GPS is enabled, the trait will track ownership changes and update the frozen actor (just like if there was only a GPS dot, it would change colour) and it will also remove frozen actors if the real actor dies or is sold.
The IRemoveFrozenActor interface is replaced with a Remove method on FrozenActorLayer. IRemoveFrozenActor is a performance problem for FrozenActorLayer.Tick as it incurs a large cache miss penalty in order to load and enumerate the array of these interfaces for every frozen actor. Instead, we invert control and allow traits to remove frozen actors directly which eliminates the performance penalty.
This custom collection allows other classes to implement a Player to value mapping, but also stores the values in an array for faster lookup by the player index in the world. For some code, this improved lookup time is important for performance.
This can be used to avoid several lookups for these traits, as well as allow Actor to provide specialised methods to deal with target types efficiently. This also reduces some code duplication.
The GPS dot was not displayed if a frozen actor for it was already visible. However, this was mistakenly affecting visibility checks in the world. Now, we only avoid rendering it when the frozen actor is present, but the indicator is still regarded as visible for visilbity checks in the world.
ChargeTime has been changed to ChargeDelay and is
measured in ticks rather than seconds.
The formula for working out the extra bar time has
been fixed to work properly at different charge delays.
Enabled firing multiple armaments at a target simultaneously.
Each armament defines own cursor for targeting.
The force attack modifier influences armament choice for target.
Autotargeting modified to handle firing multiple armaments simultaneously.
As a consequence, healers (medics) no longer require separate Heal
activity and AttackMedic and AutoHeal traits.