From: Christoph Sommer Date: Thu, 7 Jun 2007 16:30:50 +0000 (+0000) Subject: Cleaned up Ghost Particle speed calculation. Closes issue 220. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=005ca3009f69e7f9fcb0494bd554f661363ef682;p=supertux.git Cleaned up Ghost Particle speed calculation. Closes issue 220. SVN-Revision: 5069 --- diff --git a/src/object/particlesystem.cpp b/src/object/particlesystem.cpp index 4db97d3de..1c446b141 100644 --- a/src/object/particlesystem.cpp +++ b/src/object/particlesystem.cpp @@ -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); } }