diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index 778120466..5fb4730b5 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -109,6 +109,10 @@ namespace creatureStats.getAttribute(attribute).setBase ( std::min(creatureStats.getAttribute(attribute).getBase() + static_cast((level-1) * modifierSum+0.5), 100) ); } + + int strength = creatureStats.getAttribute(ESM::Attribute::Strength).getBase(); + int endurance = creatureStats.getAttribute(ESM::Attribute::Endurance).getBase(); + creatureStats.setHealth(static_cast (0.5 * (strength + endurance)) + creatureStats.getLevelHealthBonus()); } } diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index f55b00094..baa264aa4 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -76,10 +76,6 @@ namespace MWMechanics double magickaFactor = creatureStats.getMagicEffects().get (EffectKey (ESM::MagicEffect::FortifyMaximumMagicka)).mMagnitude * 0.1 + 0.5; - DynamicStat health = creatureStats.getHealth(); - health.setBase (static_cast (0.5 * (strength + endurance)) + creatureStats.getLevelHealthBonus ()); - creatureStats.setHealth (health); - DynamicStat magicka = creatureStats.getMagicka(); magicka.setBase (static_cast (intelligence + magickaFactor * intelligence)); creatureStats.setMagicka (magicka);