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

macos_ci_fix
Alexei Kotov 7 months ago
parent 1129e7b746
commit 799da630e4

@ -13,6 +13,7 @@
Bug #4816: GetWeaponDrawn returns 1 before weapon is attached
Bug #5057: Weapon swing sound plays at same pitch whether it hits or misses
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 #5714: Touch spells cast using ExplodeSpell don't always explode
Bug #5849: Paralysis breaks landing

@ -10,6 +10,8 @@
#include <osg/PositionAttitudeTransform>
#include <components/resource/scenemanager.hpp>
#include <components/sceneutil/riggeometry.hpp>
#include <components/sceneutil/riggeometryosgaextension.hpp>
#include <components/sceneutil/skeleton.hpp>
#include "visitor.hpp"
@ -37,6 +39,12 @@ namespace SceneUtil
return;
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)
{
const osg::Node* parent = *it;

Loading…
Cancel
Save