1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-20 19:39:41 +00:00

Remove never used parameter from CharacterController:update()

This commit is contained in:
fredzio 2021-01-07 11:00:57 +01:00
parent dc82cb61f4
commit 60f66f5e29
2 changed files with 7 additions and 8 deletions

View file

@ -1898,7 +1898,7 @@ void CharacterController::updateAnimQueue()
mAnimation->setLoopingEnabled(mAnimQueue.front().mGroup, mAnimQueue.size() <= 1);
}
void CharacterController::update(float duration, bool animationOnly)
void CharacterController::update(float duration)
{
MWBase::World *world = MWBase::Environment::get().getWorld();
const MWWorld::Class &cls = mPtr.getClass();
@ -2386,10 +2386,10 @@ void CharacterController::update(float duration, bool animationOnly)
world->rotateObject(mPtr, rot.x(), rot.y(), 0.0f, true);
}
if (!animationOnly && !mMovementAnimationControlled)
if (!mMovementAnimationControlled)
world->queueMovement(mPtr, vec);
}
else if (!animationOnly)
else
// We must always queue movement, even if there is none, to apply gravity.
world->queueMovement(mPtr, osg::Vec3f(0.f, 0.f, 0.f));
@ -2414,8 +2414,7 @@ void CharacterController::update(float duration, bool animationOnly)
playDeath(1.f, mDeathState);
}
// We must always queue movement, even if there is none, to apply gravity.
if (!animationOnly)
world->queueMovement(mPtr, osg::Vec3f(0.f, 0.f, 0.f));
world->queueMovement(mPtr, osg::Vec3f(0.f, 0.f, 0.f));
}
bool isPersist = isPersistentAnimPlaying();
@ -2452,10 +2451,10 @@ void CharacterController::update(float duration, bool animationOnly)
{
moved.z() = 1.0;
}
}
}
// Update movement
if(!animationOnly && mMovementAnimationControlled && mPtr.getClass().isActor())
if(mMovementAnimationControlled && mPtr.getClass().isActor())
world->queueMovement(mPtr, moved);
mSkipAnim = false;

View file

@ -248,7 +248,7 @@ public:
void updatePtr(const MWWorld::Ptr &ptr);
void update(float duration, bool animationOnly=false);
void update(float duration);
bool onOpen();
void onClose();