From cd321c0c779f937b5a1f8e3e47f1a824cc49ff01 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sat, 10 Sep 2011 03:57:51 +0000 Subject: [PATCH] - fix the tween bug by truncating after 6 decimals --- source/shared_lib/sources/graphics/particle.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/shared_lib/sources/graphics/particle.cpp b/source/shared_lib/sources/graphics/particle.cpp index a1b4b41dc..50ea41de6 100644 --- a/source/shared_lib/sources/graphics/particle.cpp +++ b/source/shared_lib/sources/graphics/particle.cpp @@ -505,6 +505,8 @@ void GameParticleSystem::setTween(float relative,float absolute) { tween /= modelCycle; } } + + truncateDecimal(tween); if(tween < 0.0f || tween > 1.0f) { printf("In [%s::%s Line: %d] WARNING setting tween to [%f] clamping tween, modelCycle [%f] absolute [%f] relative [%f]\n",__FILE__,__FUNCTION__,__LINE__,tween,modelCycle,absolute,relative); //assert(tween >= 0.0f && tween <= 1.0f);