Bring back LOD + particles
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12605 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
8bae4c1549
commit
d807871ec6
@ -37,6 +37,7 @@
|
||||
#include <IMeshSceneNode.h>
|
||||
#include <ICameraSceneNode.h>
|
||||
#include <IBillboardSceneNode.h>
|
||||
#include <IParticleSystemSceneNode.h>
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@ -410,7 +411,7 @@ TrackObjectPresentationBillboard::~TrackObjectPresentationBillboard()
|
||||
|
||||
|
||||
TrackObjectPresentationParticles::TrackObjectPresentationParticles(const XMLNode& xml_node) :
|
||||
TrackObjectPresentation(xml_node)
|
||||
TrackObjectPresentationSceneNode(xml_node)
|
||||
{
|
||||
m_emitter = NULL;
|
||||
m_lod_emitter_node = NULL;
|
||||
@ -434,7 +435,7 @@ TrackObjectPresentationParticles::TrackObjectPresentationParticles(const XMLNode
|
||||
}
|
||||
ParticleEmitter* emitter = new ParticleEmitter( kind, emitter_origin );
|
||||
|
||||
/*
|
||||
|
||||
if (clip_distance > 0)
|
||||
{
|
||||
scene::ISceneManager* sm = irr_driver->getSceneManager();
|
||||
@ -445,12 +446,12 @@ TrackObjectPresentationParticles::TrackObjectPresentationParticles(const XMLNode
|
||||
m_node = lod;
|
||||
m_lod_emitter_node = lod;
|
||||
m_emitter = emitter;
|
||||
}*/
|
||||
//else
|
||||
//{
|
||||
//m_node = emitter->getNode(); // FIXME: this leaks
|
||||
}
|
||||
else
|
||||
{
|
||||
m_node = emitter->getNode();
|
||||
m_emitter = emitter;
|
||||
//}
|
||||
}
|
||||
|
||||
if (m_trigger_condition.size() > 0)
|
||||
{
|
||||
@ -493,12 +494,6 @@ void TrackObjectPresentationParticles::triggerParticles()
|
||||
}
|
||||
}
|
||||
|
||||
void TrackObjectPresentationParticles::move(const core::vector3df& xyz, const core::vector3df& hpr,
|
||||
const core::vector3df& scale)
|
||||
{
|
||||
if (m_emitter != NULL) m_emitter->setPosition(xyz);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
@ -210,7 +210,7 @@ public:
|
||||
* \ingroup tracks
|
||||
* A track object representation that consists of a particle emitter
|
||||
*/
|
||||
class TrackObjectPresentationParticles : public TrackObjectPresentation
|
||||
class TrackObjectPresentationParticles : public TrackObjectPresentationSceneNode
|
||||
{
|
||||
private:
|
||||
ParticleEmitter* m_emitter;
|
||||
@ -222,8 +222,7 @@ public:
|
||||
virtual ~TrackObjectPresentationParticles();
|
||||
|
||||
virtual void update(float dt) OVERRIDE;
|
||||
virtual void move(const core::vector3df& xyz, const core::vector3df& hpr,
|
||||
const core::vector3df& scale) OVERRIDE;
|
||||
|
||||
std::string& getTriggerCondition() { return m_trigger_condition; }
|
||||
|
||||
void triggerParticles();
|
||||
|
Loading…
Reference in New Issue
Block a user