surviving drawbridge destruction

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.
This commit is contained in:
nethack.rankin
2007-02-20 01:45:19 +00:00
parent 4f528f2a7d
commit e92b72dee5
2 changed files with 8 additions and 1 deletions

View 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

View 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)