1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-13 21:09:39 +00:00

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

View file

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