From fb26c2c2ded454972c550fb4984c9d99543a09a0 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 21 Sep 2014 11:38:55 +0200 Subject: [PATCH] Fix autocalculated NPCs not having health/magicka/fatigue set correctly (Fixes #1943) --- apps/openmw/mwclass/npc.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index 6a7630d39..80b6088f2 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -335,6 +335,8 @@ namespace MWClass data->mNpcStats.setLevel(ref->mBase->mNpdt52.mLevel); data->mNpcStats.setBaseDisposition(ref->mBase->mNpdt52.mDisposition); data->mNpcStats.setReputation(ref->mBase->mNpdt52.mReputation); + + data->mNpcStats.setNeedRecalcDynamicStats(false); } else { @@ -349,6 +351,8 @@ namespace MWClass autoCalculateAttributes(ref->mBase, data->mNpcStats); autoCalculateSkills(ref->mBase, data->mNpcStats, ptr); + + data->mNpcStats.setNeedRecalcDynamicStats(true); } // race powers @@ -388,8 +392,6 @@ namespace MWClass data->mNpcStats.setGoldPool(gold); - data->mNpcStats.setNeedRecalcDynamicStats(false); - // store ptr.getRefData().setCustomData (data.release());