Merge branch 'copyrigvisitor' into 'master'

CopyRigVisitor: don't copy unskinned geometry (bug #5280)

Closes #5280

See merge request OpenMW/openmw!3477
macos_ci_fix
psi29a 1 year ago
commit 7475929dc8

@ -13,6 +13,7 @@
Bug #4816: GetWeaponDrawn returns 1 before weapon is attached Bug #4816: GetWeaponDrawn returns 1 before weapon is attached
Bug #5057: Weapon swing sound plays at same pitch whether it hits or misses Bug #5057: Weapon swing sound plays at same pitch whether it hits or misses
Bug #5129: Stuttering animation on Centurion Archer Bug #5129: Stuttering animation on Centurion Archer
Bug #5280: Unskinned shapes in skinned equipment are rendered in the wrong place
Bug #5371: Keyframe animation tracks are used for any file that begins with an X Bug #5371: Keyframe animation tracks are used for any file that begins with an X
Bug #5714: Touch spells cast using ExplodeSpell don't always explode Bug #5714: Touch spells cast using ExplodeSpell don't always explode
Bug #5849: Paralysis breaks landing Bug #5849: Paralysis breaks landing

@ -10,6 +10,8 @@
#include <osg/PositionAttitudeTransform> #include <osg/PositionAttitudeTransform>
#include <components/resource/scenemanager.hpp> #include <components/resource/scenemanager.hpp>
#include <components/sceneutil/riggeometry.hpp>
#include <components/sceneutil/riggeometryosgaextension.hpp>
#include <components/sceneutil/skeleton.hpp> #include <components/sceneutil/skeleton.hpp>
#include "visitor.hpp" #include "visitor.hpp"
@ -37,6 +39,12 @@ namespace SceneUtil
return; return;
const osg::Node* node = &drawable; const osg::Node* node = &drawable;
bool isRig = dynamic_cast<const SceneUtil::RigGeometry*>(node) != nullptr;
if (!isRig)
isRig = dynamic_cast<const SceneUtil::RigGeometryHolder*>(node) != nullptr;
if (!isRig)
return;
for (auto it = getNodePath().rbegin() + 1; it != getNodePath().rend(); ++it) for (auto it = getNodePath().rbegin() + 1; it != getNodePath().rend(); ++it)
{ {
const osg::Node* parent = *it; const osg::Node* parent = *it;

Loading…
Cancel
Save