Fixed Rocks being flagged as on the ground while they are carried
[supertux.git] / src / object / particlesystem.cpp
index a58a7d4..1c446b1 100644 (file)
@@ -138,10 +138,10 @@ void SnowParticleSystem::update(float elapsed_time)
 
     particle->pos.y += particle->speed * elapsed_time;
     particle->pos.x += particle->wobble * elapsed_time /* * particle->speed * 0.125*/;
-    
+
     anchor_delta = (particle->anchorx - particle->pos.x);
     particle->wobble += (4 * anchor_delta * 0.05) + systemRandom.randf(-0.5, 0.5);
-    particle->wobble *= 0.99;
+    particle->wobble *= 0.99f;
     particle->anchorx += particle->drift_speed * elapsed_time;
   }
 }
@@ -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);
   }
 }