Fixed bug told in the mailing list:
[supertux.git] / src / special.cpp
index 7e4bcbe..b287476 100644 (file)
@@ -107,7 +107,6 @@ Bullet::action(double frame_ratio)
 
   if (base.x < scroll_x ||
       base.x > scroll_x + screen->w ||
-      base.y < 0 ||
       base.y > screen->h ||
       issolid(base.x + 4, base.y + 2) ||
       issolid(base.x, base.y + 2) ||
@@ -193,8 +192,12 @@ Upgrade::action(double frame_ratio)
     }
   }
 
-  /* Off screen? Kill it! */
-  if(base.x < scroll_x - base.width || base.y > screen->h) {
+  /* Away from the screen? Kill it! */
+  if(base.x < scroll_x - OFFSCREEN_DISTANCE) {
+      remove_me();
+      return;
+  }
+  if(base.y > screen->h) {
     remove_me();
     return;
   }