Browse Source

Fixed ParticleSystem:clone not duplicating position and area spread properly

Alex Szpakowski 11 years ago
parent
commit
27f36455e8

+ 2 - 0
src/modules/graphics/opengl/ParticleSystem.cpp

@@ -117,7 +117,9 @@ ParticleSystem::ParticleSystem(const ParticleSystem &p)
 	, activeParticles(0)
 	, activeParticles(0)
 	, emissionRate(p.emissionRate)
 	, emissionRate(p.emissionRate)
 	, emitCounter(0.0f)
 	, emitCounter(0.0f)
+	, position(p.position)
 	, areaSpreadDistribution(p.areaSpreadDistribution)
 	, areaSpreadDistribution(p.areaSpreadDistribution)
+	, areaSpread(p.areaSpread)
 	, lifetime(p.lifetime)
 	, lifetime(p.lifetime)
 	, life(p.lifetime) // Initialize with the maximum life time.
 	, life(p.lifetime) // Initialize with the maximum life time.
 	, particleLifeMin(p.particleLifeMin)
 	, particleLifeMin(p.particleLifeMin)

+ 0 - 3
src/modules/graphics/opengl/ParticleSystem.h

@@ -516,9 +516,6 @@ protected:
 		Colorf color;
 		Colorf color;
 	};
 	};
 
 
-	// The max amount of particles.
-	int bufferSize;
-
 	// Pointer to the beginning of the allocated memory.
 	// Pointer to the beginning of the allocated memory.
 	particle *pMem;
 	particle *pMem;