mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-29 13:20:35 +00:00
Don't break right away when the animation time remaining is 0
This commit is contained in:
parent
60a75cb5ee
commit
23acf4b130
@ -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…
x
Reference in New Issue
Block a user