| 72 | } |
| 73 | |
| 74 | void Objects::insertModel(const MWWorld::Ptr& ptr, const std::string& mesh, bool allowLight) |
| 75 | { |
| 76 | insertBegin(ptr); |
| 77 | ptr.getRefData().getBaseNode()->setNodeMask(Mask_Object); |
| 78 | bool animated = ptr.getClass().useAnim(); |
| 79 | std::string animationMesh = mesh; |
| 80 | if (animated && !mesh.empty()) |
| 81 | { |
| 82 | animationMesh = Misc::ResourceHelpers::correctActorModelPath( |
| 83 | VFS::Path::toNormalized(mesh), mResourceSystem->getVFS()); |
| 84 | if (animationMesh == mesh && Misc::StringUtils::ciEndsWith(animationMesh, ".nif")) |
| 85 | animated = false; |
| 86 | } |
| 87 | |
| 88 | osg::ref_ptr<ObjectAnimation> anim( |
| 89 | new ObjectAnimation(ptr, animationMesh, mResourceSystem, animated, allowLight)); |
| 90 | |
| 91 | mObjects.emplace(ptr.mRef, std::move(anim)); |
| 92 | } |
| 93 | |
| 94 | void Objects::insertCreature(const MWWorld::Ptr& ptr, const std::string& mesh, bool weaponsShields) |
| 95 | { |
no test coverage detected