mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-02 03:15:35 +00:00
Don't break right away when the animation time remaining is 0
This commit is contained in:
parent
60a75cb5ee
commit
23acf4b130
2 changed files with 3 additions and 1 deletions
|
@ -225,7 +225,7 @@ Ogre::Vector3 Animation::runAnimation(float timepassed)
|
|||
Ogre::Vector3 movement = Ogre::Vector3::ZERO;
|
||||
|
||||
timepassed *= mAnimSpeedMult;
|
||||
while(mCurrentAnim && mPlaying && timepassed > 0.0f)
|
||||
while(mCurrentAnim && mPlaying)
|
||||
{
|
||||
float targetTime = mCurrentTime + timepassed;
|
||||
if(mNextKey == mCurrentKeys->end() || mNextKey->first > targetTime)
|
||||
|
|
|
@ -44,6 +44,7 @@ protected:
|
|||
* bone names) are positioned identically. */
|
||||
void updateSkeletonInstance(const Ogre::SkeletonInstance *skelsrc, Ogre::SkeletonInstance *skel);
|
||||
|
||||
|
||||
/* Updates the animation to the specified time, and returns the movement
|
||||
* vector since the last update or reset. */
|
||||
Ogre::Vector3 updatePosition(float time);
|
||||
|
@ -52,6 +53,7 @@ protected:
|
|||
* anything. If the marker is not found, it resets to the beginning. */
|
||||
void reset(const std::string &marker);
|
||||
|
||||
|
||||
void createEntityList(Ogre::SceneNode *node, const std::string &model);
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue