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