mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
Rename CharState_Idle to CharState_Alive
This commit is contained in:
parent
8720433fa9
commit
9d7ccfda1f
@ -169,7 +169,7 @@ namespace MWMechanics
|
|||||||
/* Kind of a hack. Activators need a character controller to manage an idle state. */
|
/* Kind of a hack. Activators need a character controller to manage an idle state. */
|
||||||
if(ptr.getTypeName() == typeid(ESM::Activator).name() ||
|
if(ptr.getTypeName() == typeid(ESM::Activator).name() ||
|
||||||
!MWWorld::Class::get(ptr).getCreatureStats(ptr).isDead())
|
!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
|
else
|
||||||
mActors.insert(std::make_pair(ptr, CharacterController(ptr, anim, CharState_Dead)));
|
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(!MWWorld::Class::get(iter->first).getCreatureStats(iter->first).isDead())
|
||||||
{
|
{
|
||||||
if(iter->second.getState() == CharState_Dead)
|
if(iter->second.getState() == CharState_Dead)
|
||||||
iter->second.setState(CharState_Idle);
|
iter->second.setState(CharState_Alive);
|
||||||
|
|
||||||
updateActor(iter->first, totalDuration);
|
updateActor(iter->first, totalDuration);
|
||||||
if(iter->first.getTypeName() == typeid(ESM::NPC).name())
|
if(iter->first.getTypeName() == typeid(ESM::NPC).name())
|
||||||
|
@ -43,7 +43,7 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
|
|||||||
mAnimation->setController(this);
|
mAnimation->setController(this);
|
||||||
switch(mState)
|
switch(mState)
|
||||||
{
|
{
|
||||||
case CharState_Idle:
|
case CharState_Alive:
|
||||||
mCurrentGroup = "idle";
|
mCurrentGroup = "idle";
|
||||||
mAnimation->play(mCurrentGroup, "start");
|
mAnimation->play(mCurrentGroup, "start");
|
||||||
break;
|
break;
|
||||||
@ -121,7 +121,6 @@ Ogre::Vector3 CharacterController::update(float duration)
|
|||||||
|
|
||||||
void CharacterController::playGroup(const std::string &groupname, int mode, int count)
|
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())
|
if(std::find(mAnimNames.begin(), mAnimNames.end(), groupname) != mAnimNames.end())
|
||||||
{
|
{
|
||||||
count = std::max(count, 1);
|
count = std::max(count, 1);
|
||||||
@ -159,7 +158,7 @@ void CharacterController::setState(CharacterState state)
|
|||||||
mAnimQueue.clear();
|
mAnimQueue.clear();
|
||||||
switch(mState)
|
switch(mState)
|
||||||
{
|
{
|
||||||
case CharState_Idle:
|
case CharState_Alive:
|
||||||
mCurrentGroup = "idle";
|
mCurrentGroup = "idle";
|
||||||
mAnimation->play(mCurrentGroup, "start");
|
mAnimation->play(mCurrentGroup, "start");
|
||||||
break;
|
break;
|
||||||
|
@ -12,7 +12,7 @@ namespace MWMechanics
|
|||||||
{
|
{
|
||||||
|
|
||||||
enum CharacterState {
|
enum CharacterState {
|
||||||
CharState_Idle,
|
CharState_Alive,
|
||||||
CharState_Dead
|
CharState_Dead
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user