mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
mTimeUntilWake is initialised in the constructor
This commit is contained in:
parent
48ec680f23
commit
de7a7d842b
2 changed files with 2 additions and 8 deletions
|
@ -242,11 +242,6 @@ std::string CharacterController::chooseRandomGroup (const std::string& prefix, i
|
||||||
return prefix + toString(roll);
|
return prefix + toString(roll);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CharacterController::updateKnockoutTimer(float duration)
|
|
||||||
{
|
|
||||||
mTimeUntilWake -= duration;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CharacterController::refreshHitRecoilAnims()
|
void CharacterController::refreshHitRecoilAnims()
|
||||||
{
|
{
|
||||||
bool recovery = mPtr.getClass().getCreatureStats(mPtr).getHitRecovery();
|
bool recovery = mPtr.getClass().getCreatureStats(mPtr).getHitRecovery();
|
||||||
|
@ -766,6 +761,7 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
|
||||||
, mSecondsOfRunning(0)
|
, mSecondsOfRunning(0)
|
||||||
, mTurnAnimationThreshold(0)
|
, mTurnAnimationThreshold(0)
|
||||||
, mAttackingOrSpell(false)
|
, mAttackingOrSpell(false)
|
||||||
|
, mTimeUntilWake(0.f)
|
||||||
{
|
{
|
||||||
if(!mAnimation)
|
if(!mAnimation)
|
||||||
return;
|
return;
|
||||||
|
@ -1637,7 +1633,7 @@ void CharacterController::update(float duration)
|
||||||
updateMagicEffects();
|
updateMagicEffects();
|
||||||
|
|
||||||
if (isKnockedOut())
|
if (isKnockedOut())
|
||||||
updateKnockoutTimer(duration);
|
mTimeUntilWake -= duration;
|
||||||
|
|
||||||
bool godmode = mPtr == MWMechanics::getPlayer() && MWBase::Environment::get().getWorld()->getGodModeState();
|
bool godmode = mPtr == MWMechanics::getPlayer() && MWBase::Environment::get().getWorld()->getGodModeState();
|
||||||
|
|
||||||
|
|
|
@ -226,8 +226,6 @@ class CharacterController : public MWRender::Animation::TextKeyListener
|
||||||
|
|
||||||
void updateMagicEffects();
|
void updateMagicEffects();
|
||||||
|
|
||||||
void updateKnockoutTimer(float duration);
|
|
||||||
|
|
||||||
void playDeath(float startpoint, CharacterState death);
|
void playDeath(float startpoint, CharacterState death);
|
||||||
CharacterState chooseRandomDeathState() const;
|
CharacterState chooseRandomDeathState() const;
|
||||||
void playRandomDeath(float startpoint = 0.0f);
|
void playRandomDeath(float startpoint = 0.0f);
|
||||||
|
|
Loading…
Reference in a new issue