From 86c25f5dba5c384df911fef539bd36af5f94d7fd Mon Sep 17 00:00:00 2001 From: uramer Date: Fri, 9 Feb 2018 01:53:52 +0100 Subject: [PATCH 1/2] Removed NIF flag handling to replicate vanilla engine behaviour --- components/nifbullet/bulletnifloader.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/components/nifbullet/bulletnifloader.cpp b/components/nifbullet/bulletnifloader.cpp index 9e9fe3759a..598b0f0f53 100644 --- a/components/nifbullet/bulletnifloader.cpp +++ b/components/nifbullet/bulletnifloader.cpp @@ -245,11 +245,6 @@ void BulletNifLoader::handleNiTriShape(const Nif::NiTriShape *shape, int flags, { assert(shape != NULL); - // Interpret flags - bool hidden = (flags&Nif::NiNode::Flag_Hidden) != 0; - bool collide = (flags&Nif::NiNode::Flag_MeshCollision) != 0; - bool bbcollide = (flags&Nif::NiNode::Flag_BBoxCollision) != 0; - // If the object was marked "NCO" earlier, it shouldn't collide with // anything. So don't do anything. if ((flags & 0x800)) @@ -257,10 +252,17 @@ void BulletNifLoader::handleNiTriShape(const Nif::NiTriShape *shape, int flags, return; } + + /* this is an improper way to handle NIF flags, see https://bugs.openmw.org/issues/4319#change-22066 for more details + // Interpret flags + bool hidden = (flags&Nif::NiNode::Flag_Hidden) != 0; + bool collide = (flags&Nif::NiNode::Flag_MeshCollision) != 0; + bool bbcollide = (flags&Nif::NiNode::Flag_BBoxCollision) != 0; + if (!collide && !bbcollide && hidden) // This mesh apparently isn't being used for anything, so don't // bother setting it up. - return; + return;*/ if (!shape->skin.empty()) isAnimated = false; From 5502790ed91bb985f6fcc7d541644b6e6838afa0 Mon Sep 17 00:00:00 2001 From: uramer Date: Fri, 9 Feb 2018 16:34:55 +0100 Subject: [PATCH 2/2] removed the unnecessary comment --- components/nifbullet/bulletnifloader.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/components/nifbullet/bulletnifloader.cpp b/components/nifbullet/bulletnifloader.cpp index 598b0f0f53..8f827e4e2b 100644 --- a/components/nifbullet/bulletnifloader.cpp +++ b/components/nifbullet/bulletnifloader.cpp @@ -252,18 +252,6 @@ void BulletNifLoader::handleNiTriShape(const Nif::NiTriShape *shape, int flags, return; } - - /* this is an improper way to handle NIF flags, see https://bugs.openmw.org/issues/4319#change-22066 for more details - // Interpret flags - bool hidden = (flags&Nif::NiNode::Flag_Hidden) != 0; - bool collide = (flags&Nif::NiNode::Flag_MeshCollision) != 0; - bool bbcollide = (flags&Nif::NiNode::Flag_BBoxCollision) != 0; - - if (!collide && !bbcollide && hidden) - // This mesh apparently isn't being used for anything, so don't - // bother setting it up. - return;*/ - if (!shape->skin.empty()) isAnimated = false;