From 465b7361e1e8dc0f6c46ce5f6a11af7c33715401 Mon Sep 17 00:00:00 2001 From: Mitchell Schwitzer Date: Sun, 12 Mar 2017 15:18:02 -0700 Subject: [PATCH] fix skill window update invoke winMgr->updateSkillArea() in mechanicsmanagerimp.cpp after looping over ESM::Skill::SkillEnum if any updates have occurred. --- apps/openmw/mwmechanics/mechanicsmanagerimp.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp index ca5d40b4aa..e5b9e8fcfb 100644 --- a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp +++ b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp @@ -338,16 +338,19 @@ namespace MWMechanics } } + bool updateSkills = false; //Loop over ESM::Skill::SkillEnum for(int i = 0; i < ESM::Skill::Length; ++i) { if(stats.getSkill(i) != mWatchedSkills[i] || mWatchedStatsEmpty) { + updateSkills = true; mWatchedSkills[i] = stats.getSkill(i); winMgr->setValue((ESM::Skill::SkillEnum)i, stats.getSkill(i)); } } + if (updateSkills) { winMgr->updateSkillArea(); } winMgr->setValue("level", stats.getLevel()); mWatchedStatsEmpty = false;