mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-29 15:36:41 +00:00
Fix skipAnim, only skip one animation update
This commit is contained in:
parent
e81fc42daa
commit
77446a0d58
2 changed files with 5 additions and 2 deletions
|
@ -16,6 +16,7 @@ Animation::Animation(OEngine::Render::OgreRenderer& _rend)
|
||||||
, mRend(_rend)
|
, mRend(_rend)
|
||||||
, mTime(0.0f)
|
, mTime(0.0f)
|
||||||
, mAnimate(0)
|
, mAnimate(0)
|
||||||
|
, mSkipFrame(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,12 +40,12 @@ void Animation::playGroup(std::string groupname, int mode, int loops)
|
||||||
|
|
||||||
void Animation::skipAnim()
|
void Animation::skipAnim()
|
||||||
{
|
{
|
||||||
mAnimate = 0;
|
mSkipFrame = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Animation::runAnimation(float timepassed)
|
void Animation::runAnimation(float timepassed)
|
||||||
{
|
{
|
||||||
if(mAnimate != 0)
|
if(mAnimate != 0 && !mSkipFrame)
|
||||||
{
|
{
|
||||||
mTime += timepassed;
|
mTime += timepassed;
|
||||||
|
|
||||||
|
@ -69,6 +70,7 @@ void Animation::runAnimation(float timepassed)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mSkipFrame = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ protected:
|
||||||
|
|
||||||
float mTime;
|
float mTime;
|
||||||
int mAnimate;
|
int mAnimate;
|
||||||
|
bool mSkipFrame;
|
||||||
|
|
||||||
NifOgre::EntityList mEntityList;
|
NifOgre::EntityList mEntityList;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue