mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:53:53 +00:00
move animation disabling code to a better place
This commit is contained in:
parent
f9c396e0ea
commit
5c8f491441
1 changed files with 6 additions and 3 deletions
|
@ -558,9 +558,6 @@ void CharacterController::refreshCurrentAnims(CharacterState idle, CharacterStat
|
||||||
if (mPtr.getClass().isActor())
|
if (mPtr.getClass().isActor())
|
||||||
refreshHitRecoilAnims();
|
refreshHitRecoilAnims();
|
||||||
|
|
||||||
if (isTurning() && mJumpState != JumpState_InAir)
|
|
||||||
mAnimation->disable(mJumpAnimName);
|
|
||||||
|
|
||||||
const WeaponInfo *weap = std::find_if(sWeaponTypeList, sWeaponTypeListEnd, FindWeaponType(mWeaponType));
|
const WeaponInfo *weap = std::find_if(sWeaponTypeList, sWeaponTypeListEnd, FindWeaponType(mWeaponType));
|
||||||
if (!mPtr.getClass().isBipedal(mPtr))
|
if (!mPtr.getClass().isBipedal(mPtr))
|
||||||
weap = sWeaponTypeListEnd;
|
weap = sWeaponTypeListEnd;
|
||||||
|
@ -1883,9 +1880,15 @@ void CharacterController::update(float duration)
|
||||||
else if(rot.z() != 0.0f && !sneak && !(mPtr == getPlayer() && MWBase::Environment::get().getWorld()->isFirstPerson()))
|
else if(rot.z() != 0.0f && !sneak && !(mPtr == getPlayer() && MWBase::Environment::get().getWorld()->isFirstPerson()))
|
||||||
{
|
{
|
||||||
if(rot.z() > 0.0f)
|
if(rot.z() > 0.0f)
|
||||||
|
{
|
||||||
movestate = inwater ? CharState_SwimTurnRight : CharState_TurnRight;
|
movestate = inwater ? CharState_SwimTurnRight : CharState_TurnRight;
|
||||||
|
mAnimation->disable(mJumpAnimName);
|
||||||
|
}
|
||||||
else if(rot.z() < 0.0f)
|
else if(rot.z() < 0.0f)
|
||||||
|
{
|
||||||
movestate = inwater ? CharState_SwimTurnLeft : CharState_TurnLeft;
|
movestate = inwater ? CharState_SwimTurnLeft : CharState_TurnLeft;
|
||||||
|
mAnimation->disable(mJumpAnimName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue