mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 12:49:56 +00:00
Fixes mWatchedTimeToStartDrowning initialization (fixes bug #3801)
This commit is contained in:
parent
e383e4d023
commit
7bd0c74aa8
1 changed files with 3 additions and 4 deletions
|
@ -232,8 +232,10 @@ namespace MWMechanics
|
||||||
invStore.autoEquip(ptr);
|
invStore.autoEquip(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// mWatchedTimeToStartDrowning = -1 for correct drowning state check,
|
||||||
|
// if stats.getTimeToStartDrowning() == 0 already on game start
|
||||||
MechanicsManager::MechanicsManager()
|
MechanicsManager::MechanicsManager()
|
||||||
: mWatchedTimeToStartDrowning(0), mWatchedStatsEmpty (true), mUpdatePlayer (true), mClassSelected (false),
|
: mWatchedTimeToStartDrowning(-1), mWatchedStatsEmpty (true), mUpdatePlayer (true), mClassSelected (false),
|
||||||
mRaceSelected (false), mAI(true)
|
mRaceSelected (false), mAI(true)
|
||||||
{
|
{
|
||||||
//buildPlayer no longer here, needs to be done explicitly after all subsystems are up and running
|
//buildPlayer no longer here, needs to be done explicitly after all subsystems are up and running
|
||||||
|
@ -324,9 +326,6 @@ namespace MWMechanics
|
||||||
winMgr->setValue(fbar, stats.getFatigue());
|
winMgr->setValue(fbar, stats.getFatigue());
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: if game is just started and actor is already drowning (on savegame loading),
|
|
||||||
// drowning bar will be hidden, because
|
|
||||||
// getTimeToStartDrowning = mWatchedTimeToStartDrowning = 0.
|
|
||||||
if(stats.getTimeToStartDrowning() != mWatchedTimeToStartDrowning)
|
if(stats.getTimeToStartDrowning() != mWatchedTimeToStartDrowning)
|
||||||
{
|
{
|
||||||
const float fHoldBreathTime = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>()
|
const float fHoldBreathTime = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>()
|
||||||
|
|
Loading…
Reference in a new issue