Improve render order of particles. They're still wrong looknig though (WHY?? the same code worked moments ago)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7322 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
9f4e949874
commit
9413b7e97e
@ -84,9 +84,21 @@ void ParticleEmitter::setParticleType(const ParticleKind* type)
|
||||
{
|
||||
if (m_particle_type == type) return; // already the right type
|
||||
|
||||
if (m_node != NULL) m_node->remove();
|
||||
if (m_node != NULL)
|
||||
{
|
||||
m_node->removeAll();
|
||||
m_node->removeAllAffectors();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_node = irr_driver->addParticleNode();
|
||||
|
||||
if (m_parent != NULL)
|
||||
{
|
||||
m_node->setParent(m_parent);
|
||||
}
|
||||
}
|
||||
|
||||
m_node = irr_driver->addParticleNode();
|
||||
m_particle_type = type;
|
||||
|
||||
Material* material = type->getMaterial();
|
||||
@ -104,12 +116,6 @@ void ParticleEmitter::setParticleType(const ParticleKind* type)
|
||||
m_node->setName(debug_name.c_str());
|
||||
#endif
|
||||
|
||||
|
||||
if (m_parent != NULL)
|
||||
{
|
||||
m_node->setParent(m_parent);
|
||||
}
|
||||
|
||||
m_node->setPosition(m_position);
|
||||
material->setMaterialProperties(&(m_node->getMaterial(0)));
|
||||
m_node->setMaterialTexture(0, material->getTexture());
|
||||
|
Loading…
Reference in New Issue
Block a user