fix particle system speeds
authorMatthias Braun <matze@braunis.de>
Tue, 23 Nov 2004 02:34:16 +0000 (02:34 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 23 Nov 2004 02:34:16 +0000 (02:34 +0000)
SVN-Revision: 2141

TODO
src/particlesystem.cpp

diff --git a/TODO b/TODO
index 0c1ba37..6b8a2d1 100644 (file)
--- 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
index 73a7331..b82152a 100644 (file)
@@ -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);
     }