mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-10 15:45:37 +00:00
Copy transformations data when we clone node (bug #5163)
This commit is contained in:
parent
13a0b3bf5a
commit
e568ad30ea
@ -144,6 +144,7 @@
|
|||||||
Bug #5159: NiMaterialColorController can only control the diffuse color
|
Bug #5159: NiMaterialColorController can only control the diffuse color
|
||||||
Bug #5161: Creature companions can't be activated when they are knocked down
|
Bug #5161: Creature companions can't be activated when they are knocked down
|
||||||
Bug #5164: Faction owned items handling is incorrect
|
Bug #5164: Faction owned items handling is incorrect
|
||||||
|
Bug #5163: UserData is not copied during node cloning
|
||||||
Bug #5166: Scripts still should be executed after player's death
|
Bug #5166: Scripts still should be executed after player's death
|
||||||
Feature #1774: Handle AvoidNode
|
Feature #1774: Handle AvoidNode
|
||||||
Feature #2229: Improve pathfinding AI
|
Feature #2229: Improve pathfinding AI
|
||||||
|
@ -6,8 +6,9 @@
|
|||||||
#include <osgParticle/ParticleSystemUpdater>
|
#include <osgParticle/ParticleSystemUpdater>
|
||||||
#include <osgParticle/Emitter>
|
#include <osgParticle/Emitter>
|
||||||
|
|
||||||
#include <components/sceneutil/morphgeometry.hpp>
|
#include <components/nifosg/userdata.hpp>
|
||||||
|
|
||||||
|
#include <components/sceneutil/morphgeometry.hpp>
|
||||||
#include <components/sceneutil/riggeometry.hpp>
|
#include <components/sceneutil/riggeometry.hpp>
|
||||||
|
|
||||||
namespace SceneUtil
|
namespace SceneUtil
|
||||||
@ -30,6 +31,15 @@ namespace SceneUtil
|
|||||||
return const_cast<osg::StateSet*>(stateset);
|
return const_cast<osg::StateSet*>(stateset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
osg::Object* CopyOp::operator ()(const osg::Object* node) const
|
||||||
|
{
|
||||||
|
// We should copy node transformations when we copy node
|
||||||
|
if (const NifOsg::NodeUserData* data = dynamic_cast<const NifOsg::NodeUserData*>(node))
|
||||||
|
return osg::clone(data, *this);
|
||||||
|
|
||||||
|
return osg::CopyOp::operator()(node);
|
||||||
|
}
|
||||||
|
|
||||||
osg::Node* CopyOp::operator ()(const osg::Node* node) const
|
osg::Node* CopyOp::operator ()(const osg::Node* node) const
|
||||||
{
|
{
|
||||||
if (const osgParticle::ParticleProcessor* processor = dynamic_cast<const osgParticle::ParticleProcessor*>(node))
|
if (const osgParticle::ParticleProcessor* processor = dynamic_cast<const osgParticle::ParticleProcessor*>(node))
|
||||||
|
@ -32,6 +32,7 @@ namespace SceneUtil
|
|||||||
virtual osg::Drawable* operator() (const osg::Drawable* drawable) const;
|
virtual osg::Drawable* operator() (const osg::Drawable* drawable) const;
|
||||||
|
|
||||||
virtual osg::StateSet* operator() (const osg::StateSet* stateset) const;
|
virtual osg::StateSet* operator() (const osg::StateSet* stateset) const;
|
||||||
|
virtual osg::Object* operator ()(const osg::Object* node) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// maps new ParticleProcessor to their old ParticleSystem pointer
|
// maps new ParticleProcessor to their old ParticleSystem pointer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user