|
|
@ -549,8 +549,9 @@ void CharacterController::refreshMovementAnims(const WeaponInfo* weap, Character
|
|
|
|
mCurrentMovement = movementAnimName;
|
|
|
|
mCurrentMovement = movementAnimName;
|
|
|
|
if(!mCurrentMovement.empty())
|
|
|
|
if(!mCurrentMovement.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool isrunning = mPtr.getClass().getCreatureStats(mPtr).getStance(MWMechanics::CreatureStats::Stance_Run)
|
|
|
|
bool isflying = MWBase::Environment::get().getWorld()->isFlying(mPtr);
|
|
|
|
&& !MWBase::Environment::get().getWorld()->isFlying(mPtr);
|
|
|
|
bool isrunning = mPtr.getClass().getCreatureStats(mPtr).getStance(MWMechanics::CreatureStats::Stance_Run) && !isflying;
|
|
|
|
|
|
|
|
bool issneaking = mPtr.getClass().getCreatureStats(mPtr).getStance(MWMechanics::CreatureStats::Stance_Sneak) && !isflying;
|
|
|
|
|
|
|
|
|
|
|
|
// For non-flying creatures, MW uses the Walk animation to calculate the animation velocity
|
|
|
|
// For non-flying creatures, MW uses the Walk animation to calculate the animation velocity
|
|
|
|
// even if we are running. This must be replicated, otherwise the observed speed would differ drastically.
|
|
|
|
// even if we are running. This must be replicated, otherwise the observed speed would differ drastically.
|
|
|
@ -584,7 +585,7 @@ void CharacterController::refreshMovementAnims(const WeaponInfo* weap, Character
|
|
|
|
// The first person anims don't have any velocity to calculate a speed multiplier from.
|
|
|
|
// The first person anims don't have any velocity to calculate a speed multiplier from.
|
|
|
|
// We use the third person velocities instead.
|
|
|
|
// We use the third person velocities instead.
|
|
|
|
// FIXME: should be pulled from the actual animation, but it is not presently loaded.
|
|
|
|
// FIXME: should be pulled from the actual animation, but it is not presently loaded.
|
|
|
|
mMovementAnimSpeed = (isrunning ? 222.857f : 154.064f);
|
|
|
|
mMovementAnimSpeed = (issneaking ? 33.5452f : (isrunning ? 222.857f : 154.064f));
|
|
|
|
mMovementAnimationControlled = false;
|
|
|
|
mMovementAnimationControlled = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|