Procházet zdrojové kódy

Fix number of arguments check in w_ParticleSystem_setSizes.

vrld před 13 roky
rodič
revize
94bd960cc7

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

@@ -151,9 +151,10 @@ namespace opengl
 		if (nSizes > 8)
 		if (nSizes > 8)
 			return luaL_error(L, "At most eight (8) sizes may be used.");
 			return luaL_error(L, "At most eight (8) sizes may be used.");
 
 
-		if (nSizes == 1)
+		if (nSizes <= 1)
 		{
 		{
-			t->setSize(luax_checkfloat(L, 2));
+			float size = luax_checkfloat(L, 2);
+			t->setSize(size);
 		}
 		}
 		else
 		else
 		{
 		{