mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2024-12-27 06:14:09 +00:00
commit
97dbd07ed2
@ -232,8 +232,10 @@ namespace MWMechanics
|
||||
invStore.autoEquip(ptr);
|
||||
}
|
||||
|
||||
// mWatchedTimeToStartDrowning = -1 for correct drowning state check,
|
||||
// if stats.getTimeToStartDrowning() == 0 already on game start
|
||||
MechanicsManager::MechanicsManager()
|
||||
: mWatchedTimeToStartDrowning(0), mWatchedStatsEmpty (true), mUpdatePlayer (true), mClassSelected (false),
|
||||
: mWatchedTimeToStartDrowning(-1), mWatchedStatsEmpty (true), mUpdatePlayer (true), mClassSelected (false),
|
||||
mRaceSelected (false), mAI(true)
|
||||
{
|
||||
//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());
|
||||
}
|
||||
|
||||
// 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)
|
||||
{
|
||||
const float fHoldBreathTime = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>()
|
||||
|
@ -1064,18 +1064,22 @@ namespace MWMechanics
|
||||
adjustDynamicStat(creatureStats, effectKey.mId-ESM::MagicEffect::RestoreHealth, magnitude);
|
||||
break;
|
||||
case ESM::MagicEffect::DamageHealth:
|
||||
case ESM::MagicEffect::DamageMagicka:
|
||||
case ESM::MagicEffect::DamageFatigue:
|
||||
receivedMagicDamage = true;
|
||||
adjustDynamicStat(creatureStats, effectKey.mId-ESM::MagicEffect::DamageHealth, -magnitude);
|
||||
break;
|
||||
case ESM::MagicEffect::DamageMagicka:
|
||||
case ESM::MagicEffect::DamageFatigue:
|
||||
adjustDynamicStat(creatureStats, effectKey.mId-ESM::MagicEffect::DamageHealth, -magnitude);
|
||||
break;
|
||||
case ESM::MagicEffect::AbsorbHealth:
|
||||
case ESM::MagicEffect::AbsorbMagicka:
|
||||
case ESM::MagicEffect::AbsorbFatigue:
|
||||
if (magnitude > 0.f)
|
||||
receivedMagicDamage = true;
|
||||
adjustDynamicStat(creatureStats, effectKey.mId-ESM::MagicEffect::AbsorbHealth, -magnitude);
|
||||
break;
|
||||
case ESM::MagicEffect::AbsorbMagicka:
|
||||
case ESM::MagicEffect::AbsorbFatigue:
|
||||
adjustDynamicStat(creatureStats, effectKey.mId-ESM::MagicEffect::AbsorbHealth, -magnitude);
|
||||
break;
|
||||
|
||||
case ESM::MagicEffect::DisintegrateArmor:
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user