forked from teamnwah/openmw-tes3coop
Don't use the ParticleSystem for computing placeable bounds (Bug #2700)
This commit is contained in:
parent
7b35882814
commit
b648722d3b
3 changed files with 7 additions and 1 deletions
|
@ -22,8 +22,11 @@ namespace MWRender
|
||||||
Mask_Scene = (1<<8),
|
Mask_Scene = (1<<8),
|
||||||
Mask_GUI = (1<<9),
|
Mask_GUI = (1<<9),
|
||||||
|
|
||||||
|
// Set on a Geode
|
||||||
|
Mask_ParticleSystem = (1<<10),
|
||||||
|
|
||||||
// Set on cameras within the main scene graph
|
// Set on cameras within the main scene graph
|
||||||
Mask_RenderToTexture = (1<<10)
|
Mask_RenderToTexture = (1<<11)
|
||||||
|
|
||||||
// reserved: (1<<16) for SceneUtil::Mask_Lit
|
// reserved: (1<<16) for SceneUtil::Mask_Lit
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include "../mwrender/animation.hpp"
|
#include "../mwrender/animation.hpp"
|
||||||
#include "../mwrender/renderingmanager.hpp"
|
#include "../mwrender/renderingmanager.hpp"
|
||||||
#include "../mwrender/camera.hpp"
|
#include "../mwrender/camera.hpp"
|
||||||
|
#include "../mwrender/vismask.hpp"
|
||||||
|
|
||||||
#include "../mwscript/interpretercontext.hpp"
|
#include "../mwscript/interpretercontext.hpp"
|
||||||
#include "../mwscript/globalscripts.hpp"
|
#include "../mwscript/globalscripts.hpp"
|
||||||
|
@ -1862,6 +1863,7 @@ namespace MWWorld
|
||||||
{
|
{
|
||||||
// Adjust position so the location we wanted ends up in the middle of the object bounding box
|
// Adjust position so the location we wanted ends up in the middle of the object bounding box
|
||||||
osg::ComputeBoundsVisitor computeBounds;
|
osg::ComputeBoundsVisitor computeBounds;
|
||||||
|
computeBounds.setTraversalMask(~MWRender::Mask_ParticleSystem);
|
||||||
dropped.getRefData().getBaseNode()->accept(computeBounds);
|
dropped.getRefData().getBaseNode()->accept(computeBounds);
|
||||||
osg::BoundingBox bounds = computeBounds.getBoundingBox();
|
osg::BoundingBox bounds = computeBounds.getBoundingBox();
|
||||||
if (bounds.valid())
|
if (bounds.valid())
|
||||||
|
|
|
@ -47,6 +47,7 @@ namespace
|
||||||
if (geode->getNumParents() && geode->getParent(0)->getNumParents())
|
if (geode->getNumParents() && geode->getParent(0)->getNumParents())
|
||||||
transformInitialParticles(partsys, geode->getParent(0)->getParent(0));
|
transformInitialParticles(partsys, geode->getParent(0)->getParent(0));
|
||||||
}
|
}
|
||||||
|
geode->setNodeMask((1<<10)); //MWRender::Mask_ParticleSystem
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue