From 3ebfb4e0d9b8731b2cc0e6c72ad86496eb1bcdf3 Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 17 Jun 2015 18:22:31 +0200 Subject: [PATCH] Ignore particle systems in getScreenBounds --- apps/openmw/mwrender/animation.cpp | 1 + apps/openmw/mwrender/renderingmanager.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index 9337b5a511..8c1b3c0a9a 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -1007,6 +1007,7 @@ namespace MWRender else { osg::ComputeBoundsVisitor computeBound; + computeBound.setTraversalMask(~Mask_ParticleSystem); parent->accept(computeBound); // PositionAttitudeTransform seems to be slightly faster than MatrixTransform diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index 478cadb74f..7f76adb288 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -484,6 +484,7 @@ namespace MWRender return osg::Vec4f(); osg::ComputeBoundsVisitor computeBoundsVisitor; + computeBoundsVisitor.setTraversalMask(~MWRender::Mask_ParticleSystem); ptr.getRefData().getBaseNode()->accept(computeBoundsVisitor); osg::Matrix viewProj = mViewer->getCamera()->getViewMatrix() * mViewer->getCamera()->getProjectionMatrix();