Remove an unnecessary class member

This commit is contained in:
Chris Robinson 2013-01-29 01:02:55 -08:00
parent 879359f39d
commit 99efe4e494
2 changed files with 3 additions and 6 deletions

View file

@ -27,7 +27,6 @@ Animation::Animation(const MWWorld::Ptr &ptr)
, mCurrentKeys(NULL)
, mAnimState(NULL)
, mPlaying(false)
, mLooping(false)
, mAnimSpeedMult(1.0f)
{
}
@ -187,7 +186,6 @@ void Animation::play(const std::string &groupname, const std::string &start, boo
mAnimState->setLoop(loop);
mCurrentKeys = &mTextKeys[groupname];
mLooping = loop;
reset(start);
mPlaying = true;
}
@ -206,7 +204,7 @@ Ogre::Vector3 Animation::runAnimation(float timepassed)
if(mNextKey == mCurrentKeys->end() || mNextKey->first > targetTime)
{
movement += updatePosition(targetTime);
mPlaying = (targetTime < mAnimState->getLength() || mLooping);
mPlaying = (mAnimState->getLoop() || mAnimState->getLength() >= targetTime);
break;
}
@ -224,7 +222,7 @@ Ogre::Vector3 Animation::runAnimation(float timepassed)
}
if(evt == "loop stop")
{
if(mLooping)
if(mAnimState->getLoop())
{
reset("loop start");
if(mAnimState->getTimePosition() >= time)
@ -234,7 +232,7 @@ Ogre::Vector3 Animation::runAnimation(float timepassed)
}
if(evt == "stop")
{
if(mLooping)
if(mAnimState->getLoop())
{
reset("loop start");
if(mAnimState->getTimePosition() >= time)

View file

@ -32,7 +32,6 @@ protected:
NifOgre::TextKeyMap::const_iterator mNextKey;
Ogre::AnimationState *mAnimState;
bool mPlaying;
bool mLooping;
float mAnimSpeedMult;