From 1e0d549d1d733ba147f28e5703a07f1c95d20e79 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Thu, 16 Nov 2023 15:18:28 +0300 Subject: [PATCH] NifLoader: Only handle editor marker extra data for the root node --- components/nifosg/nifloader.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index b7ef547bd6..17c608f2d4 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -679,10 +679,11 @@ namespace NifOsg // String markers may contain important information // affecting the entire subtree of this obj - if (sd->mData == "MRK" && !Loader::getShowMarkers()) + if (sd->mData == "MRK") { // Marker objects. These meshes are only visible in the editor. - args.mHasMarkers = true; + if (!Loader::getShowMarkers() && args.mRootNode == node) + args.mHasMarkers = true; } else if (sd->mData == "BONE") { @@ -696,8 +697,12 @@ namespace NifOsg } else if (e->recType == Nif::RC_BSXFlags) { + if (args.mRootNode != node) + continue; + auto bsxFlags = static_cast(e.getPtr()); - if (bsxFlags->mData & 32) // Editor marker flag + // Marker objects. + if (!Loader::getShowMarkers() && (bsxFlags->mData & 32)) args.mHasMarkers = true; } }