]> granicus.if.org Git - nethack/commitdiff
fix #H7079 - take two...
authorPatR <rankin@nethack.org>
Mon, 23 Apr 2018 07:57:31 +0000 (00:57 -0700)
committerPatR <rankin@nethack.org>
Mon, 23 Apr 2018 07:57:31 +0000 (00:57 -0700)
Instead of replacing the check for DRAWBRIDGE_UP with one for
DRAWBRIDGE_DOWN, the correct fix is to check for both because
replacing either one with water breaks the two-square dbridge.

src/zap.c

index 78b615274abcc963817a5f2c5bde17a74aea64de..1dc436880744dab7d50abc4fdb3dbe21df079bcb 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -1,4 +1,4 @@
-/* NetHack 3.6 zap.c   $NHDT-Date: 1524469189 2018/04/23 07:39:49 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.274 $ */
+/* NetHack 3.6 zap.c   $NHDT-Date: 1524470244 2018/04/23 07:57:24 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.275 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -4180,7 +4180,7 @@ const char *msg;
 
     if (!msg)
         msg = "The ice crackles and melts.";
-    if (lev->typ == DRAWBRIDGE_DOWN) {
+    if (lev->typ == DRAWBRIDGE_UP || lev->typ == DRAWBRIDGE_DOWN) {
         lev->drawbridgemask &= ~DB_ICE; /* revert to DB_MOAT */
     } else { /* lev->typ == ICE */
 #ifdef STUPID