From 9d7ccfda1ffa7edd79b52cc777466c55181296a8 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 17 Jan 2013 21:07:36 -0800 Subject: [PATCH] Rename CharState_Idle to CharState_Alive --- apps/openmw/mwmechanics/actors.cpp | 4 ++-- apps/openmw/mwmechanics/character.cpp | 5 ++--- apps/openmw/mwmechanics/character.hpp | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index 35bca441ae..00350fcc22 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -169,7 +169,7 @@ namespace MWMechanics /* Kind of a hack. Activators need a character controller to manage an idle state. */ if(ptr.getTypeName() == typeid(ESM::Activator).name() || !MWWorld::Class::get(ptr).getCreatureStats(ptr).isDead()) - mActors.insert(std::make_pair(ptr, CharacterController(ptr, anim, CharState_Idle))); + mActors.insert(std::make_pair(ptr, CharacterController(ptr, anim, CharState_Alive))); else mActors.insert(std::make_pair(ptr, CharacterController(ptr, anim, CharState_Dead))); } @@ -213,7 +213,7 @@ namespace MWMechanics if(!MWWorld::Class::get(iter->first).getCreatureStats(iter->first).isDead()) { if(iter->second.getState() == CharState_Dead) - iter->second.setState(CharState_Idle); + iter->second.setState(CharState_Alive); updateActor(iter->first, totalDuration); if(iter->first.getTypeName() == typeid(ESM::NPC).name()) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index 0b8eff7331..4e861f35c7 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -43,7 +43,7 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim mAnimation->setController(this); switch(mState) { - case CharState_Idle: + case CharState_Alive: mCurrentGroup = "idle"; mAnimation->play(mCurrentGroup, "start"); break; @@ -121,7 +121,6 @@ Ogre::Vector3 CharacterController::update(float duration) void CharacterController::playGroup(const std::string &groupname, int mode, int count) { - // set mState = CharState_Idle? if(std::find(mAnimNames.begin(), mAnimNames.end(), groupname) != mAnimNames.end()) { count = std::max(count, 1); @@ -159,7 +158,7 @@ void CharacterController::setState(CharacterState state) mAnimQueue.clear(); switch(mState) { - case CharState_Idle: + case CharState_Alive: mCurrentGroup = "idle"; mAnimation->play(mCurrentGroup, "start"); break; diff --git a/apps/openmw/mwmechanics/character.hpp b/apps/openmw/mwmechanics/character.hpp index 992cb8f1fe..cdbe439a43 100644 --- a/apps/openmw/mwmechanics/character.hpp +++ b/apps/openmw/mwmechanics/character.hpp @@ -12,7 +12,7 @@ namespace MWMechanics { enum CharacterState { - CharState_Idle, + CharState_Alive, CharState_Dead };