mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 21:49:55 +00:00
Reduced scope of fHoldBreathTime variable
This commit is contained in:
parent
c3fd327bb2
commit
3c4c47d1e6
1 changed files with 3 additions and 3 deletions
|
@ -328,13 +328,13 @@ namespace MWMechanics
|
||||||
winMgr->setValue(fbar, stats.getFatigue());
|
winMgr->setValue(fbar, stats.getFatigue());
|
||||||
}
|
}
|
||||||
|
|
||||||
static const float fHoldBreathTime = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>()
|
|
||||||
.find("fHoldBreathTime")->getFloat();
|
|
||||||
|
|
||||||
float timeToDrown = stats.getTimeToStartDrowning();
|
float timeToDrown = stats.getTimeToStartDrowning();
|
||||||
|
|
||||||
if(timeToDrown != mWatchedTimeToStartDrowning)
|
if(timeToDrown != mWatchedTimeToStartDrowning)
|
||||||
{
|
{
|
||||||
|
static const float fHoldBreathTime = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>()
|
||||||
|
.find("fHoldBreathTime")->getFloat();
|
||||||
|
|
||||||
mWatchedTimeToStartDrowning = timeToDrown;
|
mWatchedTimeToStartDrowning = timeToDrown;
|
||||||
|
|
||||||
if(timeToDrown >= fHoldBreathTime || timeToDrown == -1.0) // -1.0 is a special value during initialization
|
if(timeToDrown >= fHoldBreathTime || timeToDrown == -1.0) // -1.0 is a special value during initialization
|
||||||
|
|
Loading…
Reference in a new issue