Skip to content

Commit

Permalink
surviving drawbridge destruction
Browse files Browse the repository at this point in the history
     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.
  • Loading branch information
nethack.rankin committed Feb 20, 2007
1 parent 4f528f2 commit e92b72d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doc/fixes34.4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion src/dbridge.c
Original file line number Diff line number Diff line change
@@ -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. */

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e92b72d

Please sign in to comment.