Added a version of mriceblock that does not fall off ledges, title smartblock with...
[supertux.git] / src / badguy / poisonivy.cpp
index 742ec4a..3347465 100644 (file)
@@ -42,8 +42,8 @@ PoisonIvy::collision_squished(GameObject& object)
   // TODO: provide convenience function in MovingSprite or MovingObject?
   for (int i = 0; i < 3; i++) {
     Vector ppos = bbox.get_middle();
-    float angle = systemRandom.randf(-M_PI_2, M_PI_2);
-    float velocity = systemRandom.randf(350, 400);
+    float angle = graphicsRandom.randf(-M_PI_2, M_PI_2);
+    float velocity = graphicsRandom.randf(350, 400);
     float vx = sin(angle)*velocity;
     float vy = -cos(angle)*velocity;
     Vector pspeed = Vector(vx, vy);
@@ -54,6 +54,4 @@ PoisonIvy::collision_squished(GameObject& object)
   return true;
 }
 
-IMPLEMENT_FACTORY(PoisonIvy, "poisonivy");
-
 /* EOF */