From b7c214b1bc395c5ae7291d1e14ef46b834652a3a Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Wed, 7 Aug 2019 11:42:34 +0400 Subject: [PATCH] Do not use a separate GlowUpdater for every arrow in quiver --- apps/openmw/mwrender/actoranimation.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwrender/actoranimation.cpp b/apps/openmw/mwrender/actoranimation.cpp index df817113a..8eac63b2f 100644 --- a/apps/openmw/mwrender/actoranimation.cpp +++ b/apps/openmw/mwrender/actoranimation.cpp @@ -353,9 +353,12 @@ void ActorAnimation::updateQuiver() { osg::ref_ptr arrowNode = ammoNode->getChild(i)->asGroup(); osg::ref_ptr arrow = mResourceSystem->getSceneManager()->getInstance(model, arrowNode); - if (!ammo->getClass().getEnchantment(*ammo).empty()) - mGlowUpdater = SceneUtil::addEnchantedGlow(arrow, mResourceSystem, glowColor); } + + // Assign GlowUpdater for ammo sheathing bone itself to do not attach it to every arrow + ammoNode->setUpdateCallback(nullptr); + if (ammoCount > 0 && !ammo->getClass().getEnchantment(*ammo).empty()) + SceneUtil::addEnchantedGlow(ammoNode, mResourceSystem, glowColor); } void ActorAnimation::itemAdded(const MWWorld::ConstPtr& item, int /*count*/)