steed vs "no monster to remove"

Noticed whlie testing the steed-in-pit fix.  The EXTRA_SANITY_CHECKS
for remove_monster() are being tripped if riding hero has steed killed
out from under him because the steed is not on the map.  This started
out simple but got a bit complicated.  It seems to be sufficient but
I'm not very confident about it.

Being engulfed while mounted gave "placing monster over another?" due
to a change made along with EXTRA_SANITY_CHECKS but not conditional on
it.  (The change was to issue a warning about an actual problem which
was previously undiagnosed.)  I think bumping the engulfer off the map
in favor of the former steed only worked because some u.uswallow code
eventually used the hero's location to put the engulfer back.  I didn't
pursue that to try to figure what really happened, just prevent it.

The DISMOUNT_BONES handling was being executed even if the steed was
dead.  DISMOUNT_BONES only happens if the hero is dead.  Since I don't
know whether it's possible for dead hero and dead steed to happen at
the same time, move it inside the steed-not-dead block just in case.
This commit is contained in:
PatR
2018-11-29 12:15:14 -08:00
parent 4ab1c12f03
commit be327d9822
2 changed files with 40 additions and 13 deletions

View File

@@ -246,6 +246,8 @@ ensure tmp_at() structures are initialized for all code paths when swallowed
trapped-vs-levitation/flying change broke Sting releasing hero from web
life-saving while poly'd and Unchanging wasn't restoring u.mh (HP as monster)
change in searching stopped finding unseen monsters except hiders and eels
buliding with EXTRA_SANITY_CHECKS enabled would issue "no monster to remove"
warning if steed was killed out from under the hero
tty: turn off an optimization that is the suspected cause of Windows reported
partial status lines following level changes
tty: ensure that current status fields are always copied to prior status