attempt to tune badguy activation
authorMatthias Braun <matze@braunis.de>
Tue, 25 May 2004 10:13:07 +0000 (10:13 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 25 May 2004 10:13:07 +0000 (10:13 +0000)
SVN-Revision: 1324

src/badguy.cpp
src/defines.h

index 4f8175e..67389d5 100644 (file)
@@ -841,10 +841,10 @@ BadGuy::action(float elapsed_time)
         start_position.y < scroll_y + screen->h + Y_OFFSCREEN_DISTANCE)
       activate(LEFT);
   } else {
-    if(base.x + base.width < scroll_x - X_OFFSCREEN_DISTANCE
-      || base.x > scroll_x + screen->w + X_OFFSCREEN_DISTANCE
-      || base.y + base.height < scroll_y - Y_OFFSCREEN_DISTANCE
-      || base.y > scroll_y + screen->h + Y_OFFSCREEN_DISTANCE) {
+    if(base.x + base.width < scroll_x - X_OFFSCREEN_DISTANCE*4
+      || base.x > scroll_x + screen->w + X_OFFSCREEN_DISTANCE*4
+      || base.y + base.height < scroll_y - Y_OFFSCREEN_DISTANCE*4
+      || base.y > scroll_y + screen->h + Y_OFFSCREEN_DISTANCE*4) {
       seen = false;
       if(dying != DYING_NOT)
         remove_me();
index dd5b1a8..6b72166 100644 (file)
@@ -92,8 +92,8 @@ enum DyingType {
 
 /* Size constraints: */
 
-#define X_OFFSCREEN_DISTANCE screen->w*2
-#define Y_OFFSCREEN_DISTANCE screen->h*2
+#define X_OFFSCREEN_DISTANCE screen->w/2
+#define Y_OFFSCREEN_DISTANCE screen->h/2
 
 #define LEVEL_WIDTH 375