Fix the "remove_object: obj not on floor" panic I encountered

when investigating the report of death due to falling off steed leaving
"you were riding" in the final attributes.  (This doesn't fix that bug.)
Dismounting calls teleds() to put the character on the map and teleds()
does various iron ball manipulations, but during level change the ball
is removed from the map and those manipulations won't work as intended.
This commit is contained in:
nethack.rankin
2002-06-01 10:32:55 +00:00
parent a99a8fcba8
commit ac5975ea9d
3 changed files with 13 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)do.c 3.4 2001/11/29 */
/* SCCS Id: @(#)do.c 3.4 2002/05/31 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1120,13 +1120,13 @@ boolean at_stairs, falling, portal;
freeinv(uball);
}
}
losehp(rnd(3), "falling downstairs", KILLED_BY);
#ifdef STEED
if (u.usteed) {
/* falling off steed has its own losehp() call */
if (u.usteed)
dismount_steed(DISMOUNT_FELL);
if (Punished) unplacebc();
}
else
#endif
losehp(rnd(3), "falling downstairs", KILLED_BY);
selftouch("Falling, you");
} else if (u.dz && at_ladder)
You("climb down the ladder.");