NpcAnimation::setViewMode makes a call to the character controller, in the
mechanics manager, to forcefully update the character's state. This in turn
makes a call to the player's old NpcAniamtion object that was just deleted.
The mechanics manager will eventually remove and reinsert the player, so the
old character controller will be removed and a new one will get the right
Animation object again, but not in time for the setViewMode call.
There's many factors that all contribute to this run-around, which needs
discussion on how to best fix.
Note that the current animation gets interrupted, so switching to first person
may break movement until you stop and try to move again. This can be fixed by
alerting the character controller in the mechanics manager to force a state
update when switching POV.
Renamed Nif:KeyListT to Nif::CurveT, moved it into its own file and
changed its implementation so that on compatible platforms, the entire
array of key-frames can be read in a single read call. Added a helper
class called Nif::CurveT::interpolator to allow other code to easily
evaluate the curve. Reworked part of the skeletonLoader code to use
the interpolator to simplify its own logic.
Reworked NIFStream to use a type-handler system to decide how to extract
data from the NIF. It also has the capability to perform bulk reads on
compatible platforms, thus improving cell-load performance.
The current player cell was only being updated when the reference was not empty, causing it
to incorrectly detect a cell change the first time something was activated in a newly visited cell, immediately closing the opened dialogue again.
The containers type used to declare some iterators was not an exact match for the type of the container the iterator was being initialized from. This was causing build failure on windows.