From 880ec3ce7b3de9c77405fa3bf654e7f174df5b41 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sat, 24 Nov 2018 14:57:41 +0400 Subject: [PATCH] Fix visible sheaths for invisible actors --- apps/openmw/mwrender/actoranimation.cpp | 4 ---- apps/openmw/mwrender/npcanimation.cpp | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwrender/actoranimation.cpp b/apps/openmw/mwrender/actoranimation.cpp index e4cf283944..9f2f961ec2 100644 --- a/apps/openmw/mwrender/actoranimation.cpp +++ b/apps/openmw/mwrender/actoranimation.cpp @@ -355,10 +355,6 @@ void ActorAnimation::updateQuiver() addGlow(arrow, glowColor); } } - - // recreate shaders for invisible actors, otherwise new nodes will be visible - if (mAlpha != 1.f) - mResourceSystem->getSceneManager()->recreateShaders(mObjectRoot); } void ActorAnimation::itemAdded(const MWWorld::ConstPtr& item, int /*count*/) diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index f21f248841..e088728a0e 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -925,6 +925,10 @@ void NpcAnimation::showWeapons(bool showWeapon) updateHolsteredWeapon(!mShowWeapons); updateQuiver(); + + // Recreate shaders for invisible actors, otherwise sheath nodes will be visible + if (mAlpha != 1.f && mWeaponSheathing) + mResourceSystem->getSceneManager()->recreateShaders(mObjectRoot); } void NpcAnimation::showCarriedLeft(bool show)