From be96ff1fd169ef73d079240169c15c1f264e8280 Mon Sep 17 00:00:00 2001 From: Allofich Date: Sun, 18 Sep 2016 01:57:47 +0900 Subject: [PATCH] Remove redundant parameter --- components/nifosg/nifloader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 6ab481dd4..5557a4d63 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -369,7 +369,7 @@ namespace NifOsg return created; } - void applyNodeProperties(const Nif::Node *nifNode, osg::Node *applyTo, SceneUtil::CompositeStateSetUpdater* composite, Resource::ImageManager* imageManager, std::vector& boundTextures, int animflags, bool isRootNode) + void applyNodeProperties(const Nif::Node *nifNode, osg::Node *applyTo, SceneUtil::CompositeStateSetUpdater* composite, Resource::ImageManager* imageManager, std::vector& boundTextures, int animflags) { const Nif::PropertyList& props = nifNode->props; bool foundFirstRootTexturingProperty = false; @@ -382,7 +382,7 @@ namespace NifOsg // effect "particle texture" is used. For non-root nodes we keep setting until we have the highest // numbered one, which is the one that displays in the game and can be overridden if it matches the // lowest one on the root. - if (!foundFirstRootTexturingProperty && isRootNode && props[i].getPtr()->recType == Nif::RC_NiTexturingProperty) + if (!foundFirstRootTexturingProperty && nifNode->parent == NULL && props[i].getPtr()->recType == Nif::RC_NiTexturingProperty) { int index = props[i].getPtr()->recIndex; applyTo->setUserValue("overrideIndex", index); @@ -651,7 +651,7 @@ namespace NifOsg osg::ref_ptr composite = new SceneUtil::CompositeStateSetUpdater; - applyNodeProperties(nifNode, node, composite, imageManager, boundTextures, animflags, node == rootNode); + applyNodeProperties(nifNode, node, composite, imageManager, boundTextures, animflags); if (nifNode->recType == Nif::RC_NiTriShape && !skipMeshes) {