Skip to content

Commit

Permalink
Merge branch 'editormarkerrendering' into 'master'
Browse files Browse the repository at this point in the history
NifLoader: Only handle editor marker extra data for the root node

See merge request OpenMW/openmw!3595
  • Loading branch information
AnyOldName3 committed Nov 17, 2023
2 parents 9510665 + 1e0d549 commit 94ea054
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions components/nifosg/nifloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")
{
Expand All @@ -696,8 +697,12 @@ namespace NifOsg
}
else if (e->recType == Nif::RC_BSXFlags)
{
if (args.mRootNode != node)
continue;

auto bsxFlags = static_cast<const Nif::NiIntegerExtraData*>(e.getPtr());
if (bsxFlags->mData & 32) // Editor marker flag
// Marker objects.
if (!Loader::getShowMarkers() && (bsxFlags->mData & 32))
args.mHasMarkers = true;
}
}
Expand Down

0 comments on commit 94ea054

Please sign in to comment.