mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 13:45:32 +00:00
Fix the creature position glitch
This commit is contained in:
parent
6f747df713
commit
d56906acf7
2 changed files with 6 additions and 3 deletions
|
@ -441,6 +441,8 @@ void CharacterController::refreshCurrentAnims(CharacterState idle, CharacterStat
|
|||
}
|
||||
|
||||
// idle handled last as it can depend on the other states
|
||||
// FIXME: if one of the below states is close to their last animation frame (i.e. will be disabled in the coming update),
|
||||
// the idle animation should be displayed
|
||||
if ((mUpperBodyState != UpperCharState_Nothing
|
||||
|| mMovementState != CharState_None
|
||||
|| mHitState != CharState_None)
|
||||
|
|
|
@ -988,7 +988,11 @@ void Animation::resetActiveGroups()
|
|||
|
||||
AnimStateMap::const_iterator state = mStates.find(mAnimationTimePtr[0]->getAnimName());
|
||||
if(state == mStates.end())
|
||||
{
|
||||
if (mAccumRoot && mNonAccumRoot)
|
||||
mAccumRoot->setPosition(-mNonAccumRoot->getPosition()*mAccumulate);
|
||||
return;
|
||||
}
|
||||
|
||||
const Ogre::SharedPtr<AnimSource> &animsrc = state->second.mSource;
|
||||
const std::vector<Ogre::Controller<Ogre::Real> >&ctrls = animsrc->mControllers[0];
|
||||
|
@ -1142,9 +1146,6 @@ Ogre::Vector3 Animation::runAnimation(float duration)
|
|||
|
||||
if(!state.mPlaying && state.mAutoDisable)
|
||||
{
|
||||
if(mNonAccumCtrl && stateiter->first == mAnimationTimePtr[0]->getAnimName())
|
||||
mAccumRoot->setPosition(0.f,0.f,0.f);
|
||||
|
||||
mStates.erase(stateiter++);
|
||||
|
||||
resetActiveGroups();
|
||||
|
|
Loading…
Reference in a new issue