From bbd15cccd5c76c9245134c3a71553b400ce569ca 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 7d62d1ef11..8b6d69f2d1 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -591,7 +591,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