forked from mirror/openmw-tes3mp
Always create a skeleton if there's an "ArrowBone" node (Fixes #2117)
This commit is contained in:
parent
414f7ea02c
commit
c1e6b8608b
2 changed files with 3 additions and 2 deletions
|
@ -55,6 +55,7 @@ void WeaponAnimation::attachArrow(MWWorld::Ptr actor)
|
|||
return;
|
||||
std::string model = ammo->getClass().getModel(*ammo);
|
||||
|
||||
assert(weapon->mSkelBase && "Need a skeleton to attach the arrow to");
|
||||
mAmmunition = NifOgre::Loader::createObjects(weapon->mSkelBase, "ArrowBone", weapon->mSkelBase->getParentSceneNode(), model);
|
||||
configureAddedObject(mAmmunition, *ammo, MWWorld::InventoryStore::Slot_Ammunition);
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ bool NIFSkeletonLoader::needSkeleton(const Nif::Node *node)
|
|||
/* We need to be a little aggressive here, since some NIFs have a crap-ton
|
||||
* of nodes and Ogre only supports 256 bones. We will skip a skeleton if:
|
||||
* There are no bones used for skinning, there are no keyframe controllers, there
|
||||
* are no nodes named "AttachLight", and the tree consists of NiNode,
|
||||
* are no nodes named "AttachLight" or "ArrowBone", and the tree consists of NiNode,
|
||||
* NiTriShape, and RootCollisionNode types only.
|
||||
*/
|
||||
if(node->boneTrafo)
|
||||
|
@ -126,7 +126,7 @@ bool NIFSkeletonLoader::needSkeleton(const Nif::Node *node)
|
|||
} while(!(ctrl=ctrl->next).empty());
|
||||
}
|
||||
|
||||
if (node->name == "AttachLight")
|
||||
if (node->name == "AttachLight" || node->name == "ArrowBone")
|
||||
return true;
|
||||
|
||||
if(node->recType == Nif::RC_NiNode || node->recType == Nif::RC_RootCollisionNode)
|
||||
|
|
Loading…
Reference in a new issue