From 1c330fc8991faff93b70767df0a6097c765f1543 Mon Sep 17 00:00:00 2001 From: Emanuel Guevel Date: Sun, 21 Jul 2013 10:09:08 +0200 Subject: [PATCH] Use the correct formula for NPC health initialization --- apps/openmw/mwclass/npc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index 5fb4730b57..b6af9f0e57 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -110,9 +110,10 @@ namespace + static_cast((level-1) * modifierSum+0.5), 100) ); } + // initial health 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()); + creatureStats.setHealth(static_cast (0.5 * (strength + endurance)) + 4 * (creatureStats.getLevel() - 1)); } }