forked from teamnwah/openmw-tes3coop
Don't override animations played with playgroup
This commit is contained in:
parent
3ef40676bc
commit
f841576bba
2 changed files with 3 additions and 2 deletions
|
@ -218,7 +218,7 @@ Ogre::Vector3 CharacterController::update(float duration)
|
||||||
// Apply any sideways movement manually
|
// Apply any sideways movement manually
|
||||||
movement.x += vec.x * (speed*duration);
|
movement.x += vec.x * (speed*duration);
|
||||||
}
|
}
|
||||||
else
|
else if(mAnimQueue.size() == 0)
|
||||||
setState((inwater ? CharState_IdleSwim : CharState_Idle), true);
|
setState((inwater ? CharState_IdleSwim : CharState_Idle), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ void CharacterController::playGroup(const std::string &groupname, int mode, int
|
||||||
while(count-- > 0)
|
while(count-- > 0)
|
||||||
mAnimQueue.push_back(groupname);
|
mAnimQueue.push_back(groupname);
|
||||||
mCurrentGroup = groupname;
|
mCurrentGroup = groupname;
|
||||||
mState = CharState_Idle;
|
mState = CharState_SpecialIdle;
|
||||||
mAnimation->play(mCurrentGroup, ((mode==2) ? "loop start" : "start"), false);
|
mAnimation->play(mCurrentGroup, ((mode==2) ? "loop start" : "start"), false);
|
||||||
}
|
}
|
||||||
else if(mode == 0)
|
else if(mode == 0)
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace MWMechanics
|
||||||
{
|
{
|
||||||
|
|
||||||
enum CharacterState {
|
enum CharacterState {
|
||||||
|
CharState_SpecialIdle,
|
||||||
CharState_Idle,
|
CharState_Idle,
|
||||||
CharState_Idle2,
|
CharState_Idle2,
|
||||||
CharState_Idle3,
|
CharState_Idle3,
|
||||||
|
|
Loading…
Reference in a new issue