From a855a01f026fe6576e75a15a695e2dbc22b533ad Mon Sep 17 00:00:00 2001 From: vrld Date: Mon, 26 Dec 2011 21:29:47 +0100 Subject: [PATCH] Fix two particle system typos (thanks, Boolsheet!) --- src/modules/graphics/opengl/ParticleSystem.cpp | 2 +- src/modules/graphics/opengl/wrap_ParticleSystem.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/graphics/opengl/ParticleSystem.cpp b/src/modules/graphics/opengl/ParticleSystem.cpp index 061ee1657..4e069507f 100644 --- a/src/modules/graphics/opengl/ParticleSystem.cpp +++ b/src/modules/graphics/opengl/ParticleSystem.cpp @@ -493,7 +493,7 @@ namespace opengl size_t i = (size_t)s; size_t k = (i == sizes.size() - 1) ? i : i + 1; // boundary check (prevents failing on t = 1.0f) s -= (float)i; // transpose s to be in interval [0:1]: i <= s < i + 1 ~> 0 <= s < 1 - p->size = sizes[i] * (1.0f - t) + sizes[k] * t; + p->size = sizes[i] * (1.0f - s) + sizes[k] * s; // Update color according to given intervals (as above) s = t * (float)(colors.size() - 1); diff --git a/src/modules/graphics/opengl/wrap_ParticleSystem.cpp b/src/modules/graphics/opengl/wrap_ParticleSystem.cpp index 11086e5df..e757bfdb5 100644 --- a/src/modules/graphics/opengl/wrap_ParticleSystem.cpp +++ b/src/modules/graphics/opengl/wrap_ParticleSystem.cpp @@ -188,7 +188,7 @@ namespace opengl 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, 3, 0); + float arg3 = (float)luaL_optnumber(L, 4, 0); t->setSpin(arg1, arg2, arg3); return 0; }