|
|
|
@ -387,7 +387,8 @@ void CharacterController::refreshCurrentAnims(CharacterState idle, CharacterStat
|
|
|
|
|
{
|
|
|
|
|
float vel, speedmult = 1.0f;
|
|
|
|
|
|
|
|
|
|
bool isrunning = mPtr.getClass().getCreatureStats(mPtr).getStance(MWMechanics::CreatureStats::Stance_Run);
|
|
|
|
|
bool isrunning = mPtr.getClass().getCreatureStats(mPtr).getStance(MWMechanics::CreatureStats::Stance_Run)
|
|
|
|
|
&& !MWBase::Environment::get().getWorld()->isFlying(mPtr);
|
|
|
|
|
|
|
|
|
|
// 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.
|
|
|
|
@ -1269,9 +1270,10 @@ void CharacterController::update(float duration)
|
|
|
|
|
{
|
|
|
|
|
bool onground = world->isOnGround(mPtr);
|
|
|
|
|
bool inwater = world->isSwimming(mPtr);
|
|
|
|
|
bool isrunning = cls.getCreatureStats(mPtr).getStance(MWMechanics::CreatureStats::Stance_Run);
|
|
|
|
|
bool sneak = cls.getCreatureStats(mPtr).getStance(MWMechanics::CreatureStats::Stance_Sneak);
|
|
|
|
|
bool flying = world->isFlying(mPtr);
|
|
|
|
|
// Can't run while flying (see speed formula in Npc/Creature::getSpeed)
|
|
|
|
|
bool isrunning = cls.getCreatureStats(mPtr).getStance(MWMechanics::CreatureStats::Stance_Run) && !flying;
|
|
|
|
|
CreatureStats &stats = cls.getCreatureStats(mPtr);
|
|
|
|
|
|
|
|
|
|
//Force Jump Logic
|
|
|
|
|