mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 13:45:34 +00:00
Print warning if the RootCollisionNode is attached to non-root node (bug #4311)
This commit is contained in:
parent
6d91fe69b2
commit
61da6b6ecf
3 changed files with 9 additions and 4 deletions
|
@ -57,6 +57,7 @@
|
||||||
Bug #4293: Faction members are not aware of faction ownerships in barter
|
Bug #4293: Faction members are not aware of faction ownerships in barter
|
||||||
Bug #4304: "Follow" not working as a second AI package
|
Bug #4304: "Follow" not working as a second AI package
|
||||||
Bug #4307: World cleanup should remove dead bodies only if death animation is finished
|
Bug #4307: World cleanup should remove dead bodies only if death animation is finished
|
||||||
|
Bug #4311: OpenMW does not handle RootCollisionNode correctly
|
||||||
Bug #4327: Missing animations during spell/weapon stance switching
|
Bug #4327: Missing animations during spell/weapon stance switching
|
||||||
Bug #4333: Keyboard navigation in containers is not intuitive
|
Bug #4333: Keyboard navigation in containers is not intuitive
|
||||||
Bug #4358: Running animation is interrupted when magic mode is toggled
|
Bug #4358: Running animation is interrupted when magic mode is toggled
|
||||||
|
|
|
@ -103,7 +103,7 @@ osg::ref_ptr<Resource::BulletShape> BulletNifLoader::load(const Nif::File& nif)
|
||||||
const auto filename = nif.getFilename();
|
const auto filename = nif.getFilename();
|
||||||
const bool isAnimated = pathFileNameStartsWithX(filename);
|
const bool isAnimated = pathFileNameStartsWithX(filename);
|
||||||
|
|
||||||
handleNode(node, 0, autogenerated, isAnimated, autogenerated);
|
handleNode(filename, node, 0, autogenerated, isAnimated, autogenerated);
|
||||||
|
|
||||||
if (mCompoundShape)
|
if (mCompoundShape)
|
||||||
{
|
{
|
||||||
|
@ -178,7 +178,7 @@ bool BulletNifLoader::hasAutoGeneratedCollision(const Nif::Node* rootNode)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BulletNifLoader::handleNode(const Nif::Node *node, int flags,
|
void BulletNifLoader::handleNode(const std::string& fileName, const Nif::Node *node, int flags,
|
||||||
bool isCollisionNode, bool isAnimated, bool autogenerated)
|
bool isCollisionNode, bool isAnimated, bool autogenerated)
|
||||||
{
|
{
|
||||||
// Accumulate the flags from all the child nodes. This works for all
|
// Accumulate the flags from all the child nodes. This works for all
|
||||||
|
@ -195,6 +195,10 @@ void BulletNifLoader::handleNode(const Nif::Node *node, int flags,
|
||||||
if(node->recType == Nif::RC_AvoidNode)
|
if(node->recType == Nif::RC_AvoidNode)
|
||||||
flags |= 0x800;
|
flags |= 0x800;
|
||||||
|
|
||||||
|
// We encountered a RootCollisionNode inside autogenerated mesh. It is not right.
|
||||||
|
if (node->recType == Nif::RC_RootCollisionNode && autogenerated)
|
||||||
|
Log(Debug::Info) << "Found RootCollisionNode attached to non-root node in " << fileName << ". Treat it as a common NiTriShape.";
|
||||||
|
|
||||||
// Check for extra data
|
// Check for extra data
|
||||||
Nif::Extra const *e = node;
|
Nif::Extra const *e = node;
|
||||||
while (!e->extra.empty())
|
while (!e->extra.empty())
|
||||||
|
@ -242,7 +246,7 @@ void BulletNifLoader::handleNode(const Nif::Node *node, int flags,
|
||||||
for(size_t i = 0;i < list.length();i++)
|
for(size_t i = 0;i < list.length();i++)
|
||||||
{
|
{
|
||||||
if(!list[i].empty())
|
if(!list[i].empty())
|
||||||
handleNode(list[i].getPtr(), flags, isCollisionNode, isAnimated, autogenerated);
|
handleNode(fileName, list[i].getPtr(), flags, isCollisionNode, isAnimated, autogenerated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ public:
|
||||||
private:
|
private:
|
||||||
bool findBoundingBox(const Nif::Node* node, int flags = 0);
|
bool findBoundingBox(const Nif::Node* node, int flags = 0);
|
||||||
|
|
||||||
void handleNode(Nif::Node const *node, int flags, bool isCollisionNode, bool isAnimated=false, bool autogenerated=false);
|
void handleNode(const std::string& fileName, Nif::Node const *node, int flags, bool isCollisionNode, bool isAnimated=false, bool autogenerated=false);
|
||||||
|
|
||||||
bool hasAutoGeneratedCollision(const Nif::Node *rootNode);
|
bool hasAutoGeneratedCollision(const Nif::Node *rootNode);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue