]> granicus.if.org Git - nethack/commitdiff
jumping over sokoban pits
authorcohrs <cohrs>
Mon, 24 Mar 2003 21:56:59 +0000 (21:56 +0000)
committercohrs <cohrs>
Mon, 24 Mar 2003 21:56:59 +0000 (21:56 +0000)
reported to the list.  The code in hurtle_step was returning FALSE one
step too early, resulting in the player not actually ending up in the pit.

doc/fixes34.2
src/dothrow.c

index 054caed726837f601afccbb73f921250ebda3c53..c9300ec1337a9d8d2be3a18ee2a41dc93587c97b 100644 (file)
@@ -29,6 +29,7 @@ charge correctly when breaking multiple objects with the same zap, avoids
 clean up funny lighting on the healer locate level
 allow all tame monsters that eat to consider food thrown to them
 the screen display wasn't always up to date after map topology changes
+jumping over a sokobon pit would result in the player next to, not in, the pit
 
 
 Platform- and/or Interface-Specific Fixes
index f2f7a2734a3ac6d2f793b6c61c2289bd591489b1..a9193990fff5d32ce3c41c62a947611055a8611e 100644 (file)
@@ -448,6 +448,8 @@ hurtle_step(arg, x, y)
        return FALSE;
     } else if (!in_out_region(x, y)) {
        return FALSE;
+    } else if (*range == 0) {
+       return FALSE;                   /* previous step wants to stop now */
     }
 
     if (!Passes_walls || !(may_pass = may_passwall(x, y))) {
@@ -533,7 +535,8 @@ hurtle_step(arg, x, y)
                   In_sokoban(&u.uz)) {
                /* Air currents overcome the recoil */
                dotrap(ttmp,0);
-               return FALSE;
+               *range = 0;
+               return TRUE;
        } else {
                if (ttmp->tseen)
                    You("pass right over %s %s.",