From 2e2ede6334b5c817f08b71758c63ff6b3bc8c69c Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Mon, 23 Sep 2013 17:12:20 -0300 Subject: [PATCH] Calling ParticleSystem:setLinearAcceleration with no arguments now errors instead of defaulting to 0 (resolves issue #755) --- src/modules/graphics/opengl/wrap_ParticleSystem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/graphics/opengl/wrap_ParticleSystem.cpp b/src/modules/graphics/opengl/wrap_ParticleSystem.cpp index 7618e8665..4cd983597 100644 --- a/src/modules/graphics/opengl/wrap_ParticleSystem.cpp +++ b/src/modules/graphics/opengl/wrap_ParticleSystem.cpp @@ -251,8 +251,8 @@ int w_ParticleSystem_getSpeed(lua_State *L) int w_ParticleSystem_setLinearAcceleration(lua_State *L) { ParticleSystem *t = luax_checkparticlesystem(L, 1); - float xmin = (float) luaL_optnumber(L, 2, 0.0); - float ymin = (float) luaL_optnumber(L, 3, 0.0); + float xmin = (float) luaL_checknumber(L, 2); + float ymin = (float) luaL_checknumber(L, 3); float xmax = (float) luaL_optnumber(L, 4, xmin); float ymax = (float) luaL_optnumber(L, 5, ymin); t->setLinearAcceleration(xmin, ymin, xmax, ymax);