mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 09:53:50 +00:00
Merge pull request #2813 from Capostrophic/collisionswitch
Fix collision switch node mask (again)
This commit is contained in:
commit
7345c89b54
3 changed files with 20 additions and 1 deletions
|
@ -376,6 +376,7 @@ namespace MWRender
|
|||
|
||||
mViewer->getCamera()->setCullMask(~(Mask_UpdateVisitor|Mask_SimpleWater));
|
||||
NifOsg::Loader::setHiddenNodeMask(Mask_UpdateVisitor);
|
||||
NifOsg::Loader::setIntersectionDisabledNodeMask(Mask_Effect);
|
||||
|
||||
mNearClip = Settings::Manager::getFloat("near clip", "Camera");
|
||||
mViewDistance = Settings::Manager::getFloat("viewing distance", "Camera");
|
||||
|
|
|
@ -177,7 +177,7 @@ namespace NifOsg
|
|||
|
||||
void setEnabled(bool enabled)
|
||||
{
|
||||
setNodeMask(enabled ? ~0 : 0);
|
||||
setNodeMask(enabled ? ~0 : Loader::getIntersectionDisabledNodeMask());
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -204,6 +204,18 @@ namespace NifOsg
|
|||
return sHiddenNodeMask;
|
||||
}
|
||||
|
||||
unsigned int Loader::sIntersectionDisabledNodeMask = ~0;
|
||||
|
||||
void Loader::setIntersectionDisabledNodeMask(unsigned int mask)
|
||||
{
|
||||
sIntersectionDisabledNodeMask = mask;
|
||||
}
|
||||
|
||||
unsigned int Loader::getIntersectionDisabledNodeMask()
|
||||
{
|
||||
return sIntersectionDisabledNodeMask;
|
||||
}
|
||||
|
||||
class LoaderImpl
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -79,8 +79,14 @@ namespace NifOsg
|
|||
static void setHiddenNodeMask(unsigned int mask);
|
||||
static unsigned int getHiddenNodeMask();
|
||||
|
||||
// Set the mask to use for nodes that ignore the crosshair intersection. The default is the default node mask.
|
||||
// This is used for NiCollisionSwitch nodes with NiCollisionSwitch state set to disabled.
|
||||
static void setIntersectionDisabledNodeMask(unsigned int mask);
|
||||
static unsigned int getIntersectionDisabledNodeMask();
|
||||
|
||||
private:
|
||||
static unsigned int sHiddenNodeMask;
|
||||
static unsigned int sIntersectionDisabledNodeMask;
|
||||
static bool sShowMarkers;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue