From ab3c2544b5bcac9240d89c11daf8791395a133f0 Mon Sep 17 00:00:00 2001 From: Koncord Date: Thu, 26 Jan 2017 21:47:28 +0800 Subject: [PATCH] [Client] Use constant instead magic value --- apps/openmw/mwmp/LocalPlayer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index 0b26a83ec..9c651dcc3 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -165,8 +165,9 @@ void LocalPlayer::updateDynamicStats(bool forceUpdate) static MWMechanics::DynamicStat oldFatigue(ptrCreatureStats->getFatigue()); static float timer = 0; + const float timeoutSec = 0.5; - if ((timer += MWBase::Environment::get().getFrameDuration()) >= 0.5 || forceUpdate) + if ((timer += MWBase::Environment::get().getFrameDuration()) >= timeoutSec || forceUpdate) { if (oldHealth != health || oldMagicka != magicka || oldFatigue != fatigue || forceUpdate) {