mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
commit
97dbd07ed2
2 changed files with 11 additions and 8 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>()
|
||||||
|
|
|
@ -1064,18 +1064,22 @@ namespace MWMechanics
|
||||||
adjustDynamicStat(creatureStats, effectKey.mId-ESM::MagicEffect::RestoreHealth, magnitude);
|
adjustDynamicStat(creatureStats, effectKey.mId-ESM::MagicEffect::RestoreHealth, magnitude);
|
||||||
break;
|
break;
|
||||||
case ESM::MagicEffect::DamageHealth:
|
case ESM::MagicEffect::DamageHealth:
|
||||||
case ESM::MagicEffect::DamageMagicka:
|
|
||||||
case ESM::MagicEffect::DamageFatigue:
|
|
||||||
receivedMagicDamage = true;
|
receivedMagicDamage = true;
|
||||||
adjustDynamicStat(creatureStats, effectKey.mId-ESM::MagicEffect::DamageHealth, -magnitude);
|
adjustDynamicStat(creatureStats, effectKey.mId-ESM::MagicEffect::DamageHealth, -magnitude);
|
||||||
break;
|
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::AbsorbHealth:
|
||||||
case ESM::MagicEffect::AbsorbMagicka:
|
|
||||||
case ESM::MagicEffect::AbsorbFatigue:
|
|
||||||
if (magnitude > 0.f)
|
if (magnitude > 0.f)
|
||||||
receivedMagicDamage = true;
|
receivedMagicDamage = true;
|
||||||
adjustDynamicStat(creatureStats, effectKey.mId-ESM::MagicEffect::AbsorbHealth, -magnitude);
|
adjustDynamicStat(creatureStats, effectKey.mId-ESM::MagicEffect::AbsorbHealth, -magnitude);
|
||||||
break;
|
break;
|
||||||
|
case ESM::MagicEffect::AbsorbMagicka:
|
||||||
|
case ESM::MagicEffect::AbsorbFatigue:
|
||||||
|
adjustDynamicStat(creatureStats, effectKey.mId-ESM::MagicEffect::AbsorbHealth, -magnitude);
|
||||||
|
break;
|
||||||
|
|
||||||
case ESM::MagicEffect::DisintegrateArmor:
|
case ESM::MagicEffect::DisintegrateArmor:
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue