mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-28 22:06:50 +00:00
Play death scream only once
This commit is contained in:
parent
0d3f535590
commit
ebaa6fb5a2
1 changed files with 9 additions and 8 deletions
|
@ -728,14 +728,6 @@ void CharacterController::playRandomDeath(float startpoint)
|
||||||
MWBase::Environment::get().getWorld()->useDeathCamera();
|
MWBase::Environment::get().getWorld()->useDeathCamera();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not interrupt scripted animation by death
|
|
||||||
if (!mAnimQueue.empty())
|
|
||||||
{
|
|
||||||
AnimationQueueEntry& first = mAnimQueue.front();
|
|
||||||
if (first.mPersist && isAnimPlaying(first.mGroup))
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(mHitState == CharState_SwimKnockDown && mAnimation->hasAnimation("swimdeathknockdown"))
|
if(mHitState == CharState_SwimKnockDown && mAnimation->hasAnimation("swimdeathknockdown"))
|
||||||
{
|
{
|
||||||
mDeathState = CharState_SwimDeathKnockDown;
|
mDeathState = CharState_SwimDeathKnockDown;
|
||||||
|
@ -760,6 +752,15 @@ void CharacterController::playRandomDeath(float startpoint)
|
||||||
{
|
{
|
||||||
mDeathState = chooseRandomDeathState();
|
mDeathState = chooseRandomDeathState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do not interrupt scripted animation by death
|
||||||
|
if (!mAnimQueue.empty())
|
||||||
|
{
|
||||||
|
AnimationQueueEntry& first = mAnimQueue.front();
|
||||||
|
if (first.mPersist && isAnimPlaying(first.mGroup))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
playDeath(startpoint, mDeathState);
|
playDeath(startpoint, mDeathState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue