mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 20:53:50 +00:00
Allow KeyFrameControllers on the RootCollisionNode and its children (Bug #1934)
This commit is contained in:
parent
3ac04060c1
commit
4d6ebfb496
1 changed files with 17 additions and 14 deletions
|
@ -1063,11 +1063,11 @@ class NIFObjectLoader
|
||||||
|
|
||||||
static void createObjects(const Nif::NIFFilePtr& nif, const std::string &name, const std::string &group,
|
static void createObjects(const Nif::NIFFilePtr& nif, const std::string &name, const std::string &group,
|
||||||
Ogre::SceneNode *sceneNode, const Nif::Node *node,
|
Ogre::SceneNode *sceneNode, const Nif::Node *node,
|
||||||
ObjectScenePtr scene, int flags, int animflags, int partflags)
|
ObjectScenePtr scene, int flags, int animflags, int partflags, bool isRootCollisionNode=false)
|
||||||
{
|
{
|
||||||
// Do not create objects for the collision shape (includes all children)
|
// Do not create objects for the collision shape (includes all children)
|
||||||
if(node->recType == Nif::RC_RootCollisionNode)
|
if(node->recType == Nif::RC_RootCollisionNode)
|
||||||
return;
|
isRootCollisionNode = true;
|
||||||
|
|
||||||
// Marker objects: just skip the entire node branch
|
// Marker objects: just skip the entire node branch
|
||||||
/// \todo don't do this in the editor
|
/// \todo don't do this in the editor
|
||||||
|
@ -1120,6 +1120,8 @@ class NIFObjectLoader
|
||||||
if(!node->controller.empty())
|
if(!node->controller.empty())
|
||||||
createNodeControllers(nif, name, node->controller, scene, animflags);
|
createNodeControllers(nif, name, node->controller, scene, animflags);
|
||||||
|
|
||||||
|
if (!isRootCollisionNode)
|
||||||
|
{
|
||||||
if(node->recType == Nif::RC_NiCamera)
|
if(node->recType == Nif::RC_NiCamera)
|
||||||
{
|
{
|
||||||
/* Ignored */
|
/* Ignored */
|
||||||
|
@ -1135,6 +1137,7 @@ class NIFObjectLoader
|
||||||
{
|
{
|
||||||
createParticleSystem(name, group, sceneNode, scene, node, flags, partflags, animflags);
|
createParticleSystem(name, group, sceneNode, scene, node, flags, partflags, animflags);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const Nif::NiNode *ninode = dynamic_cast<const Nif::NiNode*>(node);
|
const Nif::NiNode *ninode = dynamic_cast<const Nif::NiNode*>(node);
|
||||||
if(ninode)
|
if(ninode)
|
||||||
|
@ -1143,7 +1146,7 @@ class NIFObjectLoader
|
||||||
for(size_t i = 0;i < children.length();i++)
|
for(size_t i = 0;i < children.length();i++)
|
||||||
{
|
{
|
||||||
if(!children[i].empty())
|
if(!children[i].empty())
|
||||||
createObjects(nif, name, group, sceneNode, children[i].getPtr(), scene, flags, animflags, partflags);
|
createObjects(nif, name, group, sceneNode, children[i].getPtr(), scene, flags, animflags, partflags, isRootCollisionNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue