The conjugate of a quaternion just negates the x/y/z components, so
there is no need to recalculate from scratch and throw away precision
by forcing a quat->euler->quat round trip.
This avoids precision loss when combining rotations.
The equivalent Euler angles are calculated for external use
but the quaternion components are preferred for any further
internal calculations.
Allows to pass the horizontal facing/yaw
and vertical angle/pitch of the carrier
projectile to warheads for further use.
Add ImpactPosition to WarheadArgs
InflictDamage doesn't pass the impact pos
directly, and the very point of WarheadArgs
is to avoid adding more and more arguments
to the warhead methods.
* Rename LeftColor and RightColor to MinColor and MaxColor
These are mapped from LowRadarColor and HighRadarColor in
the original inis, and appear to be used to set the bounding
values for selecting a random colour, NOT for left/right
pixels (which caused noticeably wrong banding).
* Adjust brightness based on terrain height.
MinHeightColorBrightness and MaxHeightColorBrightness
were chosen by trial/error to match the original
map preview rendering.
Inits that are logically singletons (e.g. actor
location or owner) should implement this interface
to avoid runtime inconsistencies.
Duplicate instances are rejected at init-time,
allowing simpler queries when they are used.
If a weapon was aiming at a target position rather
than an actor target, it would always check target types
of the terrain below, ignoring altitude (and therefore ignoring
"InvalidTargets: Air").
A shared ValueActorInit<T> is introduced to reduce duplication
in the most common init cases, and an ActorInitActorReference
allow actors to be referenced by map.yaml name.