Reduced scope of fHoldBreathTime variable

0.6.1
Andrei Kortunov 8 years ago
parent c3fd327bb2
commit 3c4c47d1e6

@ -328,13 +328,13 @@ namespace MWMechanics
winMgr->setValue(fbar, stats.getFatigue());
}
static const float fHoldBreathTime = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>()
.find("fHoldBreathTime")->getFloat();
float timeToDrown = stats.getTimeToStartDrowning();
if(timeToDrown != mWatchedTimeToStartDrowning)
{
static const float fHoldBreathTime = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>()
.find("fHoldBreathTime")->getFloat();
mWatchedTimeToStartDrowning = timeToDrown;
if(timeToDrown >= fHoldBreathTime || timeToDrown == -1.0) // -1.0 is a special value during initialization

Loading…
Cancel
Save