From: <au...@us...> - 2011-01-07 01:37:40
|
Revision: 7322 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7322&view=rev Author: auria Date: 2011-01-07 01:37:34 +0000 (Fri, 07 Jan 2011) Log Message: ----------- Improve render order of particles. They're still wrong looknig though (WHY?? the same code worked moments ago) Modified Paths: -------------- main/trunk/src/graphics/particle_emitter.cpp Modified: main/trunk/src/graphics/particle_emitter.cpp =================================================================== --- main/trunk/src/graphics/particle_emitter.cpp 2011-01-07 01:32:46 UTC (rev 7321) +++ main/trunk/src/graphics/particle_emitter.cpp 2011-01-07 01:37:34 UTC (rev 7322) @@ -84,9 +84,21 @@ { 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 @@ 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()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |