Skip to content

Particle::loadPostProcess looks odd #842

Open
@xezon

Description

@xezon
class Particle
{
...
	union
	{
		ParticleSystem *	m_systemUnderControl;			///< the particle system attached to this particle (not the system that created us)
		ParticleSystemID	m_systemUnderControlID;	///< id of system attached to this particle (not the system that created us);
	};
void Particle::loadPostProcess( void )
{
...
	// tidy up the m_systemUnderControl pointer
	if( m_systemUnderControlID != INVALID_PARTICLE_SYSTEM_ID )
	{
		ParticleSystem *system;
		
		// find system
		system = TheParticleSystemManager->findParticleSystem( m_systemUnderControlID ); // <---- what?

		// set us as the control particle for this system
		system->setControlParticle( this );
		controlParticleSystem( system );

		// sanity
		if( m_systemUnderControlID == NULL )
		{

			DEBUG_CRASH(( "Particle::loadPostProcess - Unable to find system under control pointer\n" ));
			throw SC_INVALID_DATA;

		}  // end if

	}  // end if

}  // end loadPostProcess

Metadata

Metadata

Assignees

No one assigned

    Labels

    InvestigateMinorSeverity: Minor < Major < Critical < Blocker

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions