mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Use "setObjectRoot" in esm4npcanimation.cpp
This commit is contained in:
parent
4beed29404
commit
1acac873cf
@ -22,13 +22,16 @@ namespace MWRender
|
||||
const MWWorld::Ptr& ptr, osg::ref_ptr<osg::Group> parentNode, Resource::ResourceSystem* resourceSystem)
|
||||
: Animation(ptr, std::move(parentNode), resourceSystem)
|
||||
{
|
||||
getOrCreateObjectRoot();
|
||||
std::string smodel
|
||||
= Misc::ResourceHelpers::correctMeshPath(mPtr.getClass().getModel(mPtr), mResourceSystem->getVFS());
|
||||
setObjectRoot(smodel, true, true, false);
|
||||
updateParts();
|
||||
}
|
||||
|
||||
void ESM4NpcAnimation::updateParts()
|
||||
{
|
||||
mObjectRoot->removeChildren(0, mObjectRoot->getNumChildren());
|
||||
if (!mObjectRoot.get())
|
||||
return;
|
||||
const ESM4::Npc* traits = MWClass::ESM4Npc::getTraitsRecord(mPtr);
|
||||
// There is no flag "mIsTES5", so we can not distinguish from other cases.
|
||||
// But calling wrong `updateParts*` function shouldn't crash the game and will
|
||||
|
Loading…
x
Reference in New Issue
Block a user