Browse Source

Removed the optional variation parameter from ParticleSystem:setSpin (issue #634). ParticleSystem:setSpinVariation still exists.

Alex Szpakowski 12 years ago
parent
commit
d5ef29e015

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

@@ -629,13 +629,6 @@ void ParticleSystem::setSpin(float start, float end)
 	spinEnd = end;
 }
 
-void ParticleSystem::setSpin(float start, float end, float variation)
-{
-	spinStart = start;
-	spinEnd = end;
-	spinVariation = variation;
-}
-
 void ParticleSystem::getSpin(float *start, float *end) const
 {
 	if (start)

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

@@ -375,19 +375,11 @@ public:
 
 	/**
 	 * Sets the spin of the sprite upon particle creation and death.
-	 * @param start The spin of the sprite upon creation (in degrees).
-	 * @param end The spin of the sprite upon death (in degrees).
+	 * @param start The spin of the sprite upon creation (in radians / second).
+	 * @param end The spin of the sprite upon death (in radians / second).
 	 **/
 	void setSpin(float start, float end);
 
-	/**
-	 * Sets the spin of the sprite upon particle creation and death and the variation.
-	 * @param start The spin of the sprite upon creation (in degrees).
-	 * @param end The spin of the sprite upon death (in degrees).
-	 * @param variation The variation of the start spin (0 being no variation and 1 beign a random spin between start and end).
-	 **/
-	void setSpin(float start, float end, float variation);
-
 	/**
 	 * Gets the amount of spin of a particle during its lifetime.
 	 * @param[out] start
@@ -397,7 +389,7 @@ public:
 
 	/**
 	 * Sets the variation of the start spin (0 being no variation and 1 being a random spin between start and end).
-	 * @param variation The variation in degrees.
+	 * @param variation The variation.
 	 **/
 	void setSpinVariation(float variation);
 

+ 1 - 2
src/modules/graphics/opengl/wrap_ParticleSystem.cpp

@@ -423,8 +423,7 @@ int w_ParticleSystem_setSpin(lua_State *L)
 	ParticleSystem *t = luax_checkparticlesystem(L, 1);
 	float arg1 = (float)luaL_checknumber(L, 2);
 	float arg2 = (float)luaL_optnumber(L, 3, arg1);
-	float arg3 = (float)luaL_optnumber(L, 4, 0);
-	t->setSpin(arg1, arg2, arg3);
+	t->setSpin(arg1, arg2);
 	return 0;
 }