From 57d8df1a052d0ab8c80d121de14ef6b052ba2b45 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sun, 3 Feb 2019 11:27:48 +0400 Subject: [PATCH] Do not check if additional animation sources are supported for every animation object --- apps/openmw/mwrender/animation.cpp | 5 ++--- apps/openmw/mwrender/animation.hpp | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index 7730b9104..035908922 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -641,8 +641,6 @@ namespace MWRender mAnimationTimePtr[i].reset(new AnimationTime); mLightListCallback = new SceneUtil::LightListCallback; - - mUseAdditionalSources = Settings::Manager::getBool ("use additional anim sources", "Game"); } Animation::~Animation() @@ -754,7 +752,8 @@ namespace MWRender addSingleAnimSource(kfname, baseModel); - if (mUseAdditionalSources) + static const bool useAdditionalSources = Settings::Manager::getBool ("use additional anim sources", "Game"); + if (useAdditionalSources) loadAllAnimationsInFolder(kfname, baseModel); } diff --git a/apps/openmw/mwrender/animation.hpp b/apps/openmw/mwrender/animation.hpp index 47edbdc0b..153f2ead9 100644 --- a/apps/openmw/mwrender/animation.hpp +++ b/apps/openmw/mwrender/animation.hpp @@ -273,8 +273,6 @@ protected: osg::ref_ptr mLightListCallback; - bool mUseAdditionalSources; - const NodeMap& getNodeMap() const; /* Sets the appropriate animations on the bone groups based on priority.