From 10ef0a34d94909522fd69141f3a55792bd00e503 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 28 Jun 2014 17:54:14 +0200 Subject: [PATCH] Update effects even when main animation is paused (Fixes #1585) --- apps/openmw/mwmechanics/character.cpp | 2 ++ apps/openmw/mwrender/animation.hpp | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index bd076bead..2c5d68ceb 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -1449,6 +1449,8 @@ void CharacterController::update(float duration) if(mMovementAnimVelocity > 0) world->queueMovement(mPtr, moved); } + else if (mAnimation) + mAnimation->updateEffects(duration); mSkipAnim = false; } diff --git a/apps/openmw/mwrender/animation.hpp b/apps/openmw/mwrender/animation.hpp index 1544d42c9..e15bd6ecb 100644 --- a/apps/openmw/mwrender/animation.hpp +++ b/apps/openmw/mwrender/animation.hpp @@ -226,9 +226,6 @@ public: virtual void preRender (Ogre::Camera* camera); virtual void setAlpha(float alpha) {} -private: - void updateEffects(float duration); - public: void updatePtr(const MWWorld::Ptr &ptr); @@ -301,6 +298,9 @@ public: virtual Ogre::Vector3 runAnimation(float duration); + /// This is typically called as part of runAnimation, but may be called manually if needed. + void updateEffects(float duration); + virtual void showWeapons(bool showWeapon); virtual void showCarriedLeft(bool show) {} virtual void attachArrow() {}