Cleaned up Ghost Particle speed calculation. Closes issue 220.
authorChristoph Sommer <mail@christoph-sommer.de>
Thu, 7 Jun 2007 16:30:50 +0000 (16:30 +0000)
committerChristoph Sommer <mail@christoph-sommer.de>
Thu, 7 Jun 2007 16:30:50 +0000 (16:30 +0000)
SVN-Revision: 5069

src/object/particlesystem.cpp

index 4db97d3..1c446b1 100644 (file)
@@ -163,10 +163,7 @@ GhostParticleSystem::GhostParticleSystem()
     particle->pos.y = systemRandom.randf(SCREEN_HEIGHT);
     int size = systemRandom.rand(2);
     particle->texture = ghosts[size];
-    do {
-      particle->speed = size*.2 + systemRandom.randf(3.6);
-    } while(particle->speed < 1);
-    particle->speed *= 50;
+    particle->speed = systemRandom.randf(std::max(50, (size * 10)), 180 + (size * 10));
     particles.push_back(particle);
   }
 }