From: Matthias Braun Date: Tue, 23 Nov 2004 02:34:16 +0000 (+0000) Subject: fix particle system speeds X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=e5f4c975097d8a04bb375b0ef57eeb1618907e9c;p=supertux.git fix particle system speeds SVN-Revision: 2141 --- diff --git a/TODO b/TODO index 0c1ba3745..6b8a2d133 100644 --- a/TODO +++ b/TODO @@ -90,7 +90,7 @@ L: low priority * what to do when stuck under tiles (after using duck-sliding) * do we want multi hit scores again? * tux doesn't stop at igloo anymore - * background particle systems are too slow + * background particle systems are too slow - ok --Code Refactoring/Cleanup/Optimisation-- [H] make the title using GameSession instead of reimplementing all the stuff diff --git a/src/particlesystem.cpp b/src/particlesystem.cpp index 73a7331ea..b82152a13 100644 --- a/src/particlesystem.cpp +++ b/src/particlesystem.cpp @@ -88,8 +88,9 @@ SnowParticleSystem::SnowParticleSystem() int snowsize = rand() % 3; particle->texture = snowimages[snowsize]; do { - particle->speed = snowsize/60.0 + (float(rand()%10)/300.0); - } while(particle->speed < 0.01); + particle->speed = snowsize*.2 + (float(rand()%10)*.4); + } while(particle->speed < 1); + particle->speed *= 10; // gravity particles.push_back(particle); }