Avoid colliding with AvoidNodes

These are placed under the RootCollisionNode hierarchy, but the shapes they
hold aren't collided with. Their exact function is unknown, but seems to be
related to lava? Maybe damage avoidance info for the AI.
This commit is contained in:
Chris Robinson 2013-04-28 11:12:55 -07:00
parent 24e503330b
commit 4cedf0fbab
3 changed files with 6 additions and 1 deletions

View file

@ -207,7 +207,7 @@ struct RecordFactoryEntry {
static const RecordFactoryEntry recordFactories [] = {
{ "NiNode", &construct <NiNode >, RC_NiNode },
{ "AvoidNode", &construct <NiNode >, RC_NiNode },
{ "AvoidNode", &construct <NiNode >, RC_AvoidNode },
{ "NiBSParticleNode", &construct <NiNode >, RC_NiBSParticleNode },
{ "NiBSAnimationNode", &construct <NiNode >, RC_NiBSAnimationNode },
{ "NiBillboardNode", &construct <NiNode >, RC_NiNode },

View file

@ -36,6 +36,7 @@ enum RecordType
{
RC_MISSING = 0,
RC_NiNode,
RC_AvoidNode,
RC_NiTriShape,
RC_NiRotatingParticles,
RC_NiAutoNormalParticles,

View file

@ -185,6 +185,10 @@ void ManualBulletShapeLoader::handleNode(btTriangleMesh* mesh, const Nif::Node *
else
isCollisionNode = isCollisionNode && (node->recType != Nif::RC_RootCollisionNode);
// Don't collide with AvoidNode shapes
if(node->recType == Nif::RC_AvoidNode)
flags |= 0x800;
// Marker objects
/// \todo don't do this in the editor
std::string nodename = node->name;