]> granicus.if.org Git - nethack/commitdiff
surviving drawbridge destruction
authornethack.rankin <nethack.rankin>
Tue, 20 Feb 2007 01:45:19 +0000 (01:45 +0000)
committernethack.rankin <nethack.rankin>
Tue, 20 Feb 2007 01:45:19 +0000 (01:45 +0000)
     From a bug report:  you could end up
standing on water/lava if you survived being on an open drawbridge while
it was destroyed.  This fixes the bridge destruction case; opening and
closing are handled differently and I left them alone.

doc/fixes34.4
src/dbridge.c

index b5efe1e06c73b3271ad81851a62f2c47aa92f5c7..2fdd6a9fcbcad7b840194bd6eb3694e591743cbb 100644 (file)
@@ -324,6 +324,8 @@ dropped wielded, in use leash should remain in inventory, since it's in-use
 wielded, in use leash can't be snatched by whip-wielding monster
 when using two weapons at once, whip-wielding monster can target either one
 can't #force floor item while engulfed, levitating, or unskilled riding
+if hero or monster standing on opened drawbridge survives its destruction,
+       fall into water or lava instead of remaining on top
 
 
 Platform- and/or Interface-Specific Fixes
index 3949e4d6d864969c5de6b6df8d183f949308b8ab..2e5cfe9f49849c30f69c8ca603244d9e642dc2f1 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)dbridge.c  3.5     2006/12/13      */
+/*     SCCS Id: @(#)dbridge.c  3.5     2007/02/19      */
 /*     Copyright (c) 1989 by Jean-Christophe Collet              */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -930,6 +930,11 @@ int x,y;
 #ifdef D_DEBUG
                        pline("%s spared!", E_phrase(etmp1, "are"));
 #endif
+                       /* if there is water or lava here, fall in now */
+                       if (is_u(etmp1))
+                           spoteffects(FALSE);
+                       else
+                           (void)minliquid(etmp1->emon);
                } else {
                        if (e_inview) {
                            if (!is_u(etmp1) && Hallucination)