|
|
|
@ -254,6 +254,7 @@ void CharacterController::refreshHitRecoilAnims()
|
|
|
|
|
|| mPtr.getClass().getCreatureStats(mPtr).getFatigue().getBase() == 0)
|
|
|
|
|
&& mAnimation->hasAnimation("knockout"))
|
|
|
|
|
{
|
|
|
|
|
mTimeUntilWake = Misc::Rng::rollClosedProbability() * 2 + 1; // Wake up after 1 to 3 seconds
|
|
|
|
|
if (isSwimming && mAnimation->hasAnimation("swimknockout"))
|
|
|
|
|
{
|
|
|
|
|
mHitState = CharState_SwimKnockOut;
|
|
|
|
@ -338,7 +339,8 @@ void CharacterController::refreshHitRecoilAnims()
|
|
|
|
|
mPtr.getClass().getCreatureStats(mPtr).setBlock(false);
|
|
|
|
|
mHitState = CharState_None;
|
|
|
|
|
}
|
|
|
|
|
else if (isKnockedOut() && mPtr.getClass().getCreatureStats(mPtr).getFatigue().getCurrent() > 0)
|
|
|
|
|
else if (isKnockedOut() && mPtr.getClass().getCreatureStats(mPtr).getFatigue().getCurrent() > 0
|
|
|
|
|
&& mTimeUntilWake <= 0)
|
|
|
|
|
{
|
|
|
|
|
mHitState = isSwimming ? CharState_SwimKnockDown : CharState_KnockDown;
|
|
|
|
|
mAnimation->disable(mCurrentHit);
|
|
|
|
@ -767,6 +769,7 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
|
|
|
|
|
, mSecondsOfRunning(0)
|
|
|
|
|
, mTurnAnimationThreshold(0)
|
|
|
|
|
, mAttackingOrSpell(false)
|
|
|
|
|
, mTimeUntilWake(0.f)
|
|
|
|
|
{
|
|
|
|
|
if(!mAnimation)
|
|
|
|
|
return;
|
|
|
|
@ -1636,6 +1639,9 @@ void CharacterController::update(float duration)
|
|
|
|
|
float speed = 0.f;
|
|
|
|
|
|
|
|
|
|
updateMagicEffects();
|
|
|
|
|
|
|
|
|
|
if (isKnockedOut())
|
|
|
|
|
mTimeUntilWake -= duration;
|
|
|
|
|
|
|
|
|
|
bool godmode = mPtr == MWMechanics::getPlayer() && MWBase::Environment::get().getWorld()->getGodModeState();
|
|
|
|
|
|
|
|
|
|