mTimeUntilWake is initialised in the constructor

pull/331/head
rexelion 7 years ago
parent 48ec680f23
commit de7a7d842b

@ -242,11 +242,6 @@ std::string CharacterController::chooseRandomGroup (const std::string& prefix, i
return prefix + toString(roll);
}
void CharacterController::updateKnockoutTimer(float duration)
{
mTimeUntilWake -= duration;
}
void CharacterController::refreshHitRecoilAnims()
{
bool recovery = mPtr.getClass().getCreatureStats(mPtr).getHitRecovery();
@ -766,6 +761,7 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
, mSecondsOfRunning(0)
, mTurnAnimationThreshold(0)
, mAttackingOrSpell(false)
, mTimeUntilWake(0.f)
{
if(!mAnimation)
return;
@ -1637,7 +1633,7 @@ void CharacterController::update(float duration)
updateMagicEffects();
if (isKnockedOut())
updateKnockoutTimer(duration);
mTimeUntilWake -= duration;
bool godmode = mPtr == MWMechanics::getPlayer() && MWBase::Environment::get().getWorld()->getGodModeState();

@ -226,8 +226,6 @@ class CharacterController : public MWRender::Animation::TextKeyListener
void updateMagicEffects();
void updateKnockoutTimer(float duration);
void playDeath(float startpoint, CharacterState death);
CharacterState chooseRandomDeathState() const;
void playRandomDeath(float startpoint = 0.0f);

Loading…
Cancel
Save