Improve particle system placement when no emitters are specified

actorid
Chris Robinson 12 years ago
parent e7c0f2a211
commit 973fdeb2e0

@ -1566,7 +1566,11 @@ class NIFObjectLoader : Ogre::ManualResourceLoader
} }
if(!partsys->isAttached()) if(!partsys->isAttached())
entitybase->attachObjectToBone(partnode->name, partsys); {
int trgtid = NIFSkeletonLoader::lookupOgreBoneHandle(mName, partnode->recIndex);
Ogre::Bone *trgtbone = entitybase->getSkeleton()->getBone(trgtid);
entitybase->attachObjectToBone(trgtbone->getName(), partsys);
}
} }
catch(std::exception &e) { catch(std::exception &e) {
std::cerr<< "Particles exception: "<<e.what() <<std::endl; std::cerr<< "Particles exception: "<<e.what() <<std::endl;

Loading…
Cancel
Save