mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-29 17:06:43 +00:00
Merge pull request #2529 from akortunov/nodecopy
Copy transformations data when we clone node
This commit is contained in:
commit
02d7b13075
3 changed files with 13 additions and 1 deletions
|
@ -171,6 +171,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
|
||||||
Bug #5167: Player can select and cast spells before magic menu is enabled
|
Bug #5167: Player can select and cast spells before magic menu is enabled
|
||||||
Bug #5168: Force1stPerson and Force3rdPerson commands are not really force view change
|
Bug #5168: Force1stPerson and Force3rdPerson commands are not really force view change
|
||||||
|
|
|
@ -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…
Reference in a new issue