From 005ca3009f69e7f9fcb0494bd554f661363ef682 Mon Sep 17 00:00:00 2001 From: Christoph Sommer Date: Thu, 7 Jun 2007 16:30:50 +0000 Subject: [PATCH] Cleaned up Ghost Particle speed calculation. Closes issue 220. SVN-Revision: 5069 --- src/object/particlesystem.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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); } } -- 2.11.0