From 02aaae46ce2b7e3968bc477b232fec6187081e39 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Mon, 27 Apr 2020 00:21:34 +0300 Subject: [PATCH] Fix hidden node with NiVisController optimization --- components/nifosg/nifloader.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 5a96937406..ab1ddb796d 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -582,7 +582,13 @@ namespace NifOsg { bool hasVisController = false; for (Nif::ControllerPtr ctrl = nifNode->controller; !ctrl.empty(); ctrl = ctrl->next) - hasVisController = (ctrl->recType == Nif::RC_NiVisController); + { + if (ctrl->recType == Nif::RC_NiVisController) + { + hasVisController = true; + break; + } + } if (!hasVisController) skipMeshes = true; // skip child meshes, but still create the child node hierarchy for animating collision shapes