mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 03:39:55 +00:00
Reduced scope of fHoldBreathTime variable
This commit is contained in:
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…
x
Reference in New Issue
Block a user