fix for bug scrawl mentioned

This commit is contained in:
mrcheko 2014-01-10 19:04:07 +02:00
parent d41f27451b
commit ffcb7fb280
2 changed files with 3 additions and 2 deletions

View file

@ -181,7 +181,7 @@ void CharacterController::refreshCurrentAnims(CharacterState idle, CharacterStat
mCurrentHit = sHitList[iHit]; mCurrentHit = sHitList[iHit];
if(mPtr.getRefData().getHandle()=="player" && !mAnimation->hasAnimation(mCurrentHit)) if(mPtr.getRefData().getHandle()=="player" && !mAnimation->hasAnimation(mCurrentHit))
{ {
//only 4 different hit animations if player is in 1st person //only 3 different hit animations if player is in 1st person
int iHit = rand() % (sHitListSize-3); int iHit = rand() % (sHitListSize-3);
mCurrentHit = sHitList[iHit]; mCurrentHit = sHitList[iHit];
} }
@ -489,7 +489,7 @@ bool CharacterController::updateNpcState(bool onground, bool inwater, bool isrun
const bool isWerewolf = stats.isWerewolf(); const bool isWerewolf = stats.isWerewolf();
bool forcestateupdate = false; bool forcestateupdate = false;
if(weaptype != mWeaponType) if(weaptype != mWeaponType && mHitState != CharState_KnockDown)
{ {
forcestateupdate = true; forcestateupdate = true;

View file

@ -258,6 +258,7 @@ public:
/** Returns true if the named animation group is playing. */ /** Returns true if the named animation group is playing. */
bool isPlaying(const std::string &groupname) const; bool isPlaying(const std::string &groupname) const;
//Checks if playing any animation which shouldn't be stopped when switching camera view modes
bool allowSwitchViewMode() const; bool allowSwitchViewMode() const;
/** Gets info about the given animation group. /** Gets info about the given animation group.