]> granicus.if.org Git - nethack/commit
fix #h192 - missile which kills engulfer is in limbo when hero gets expelled (trunk...
authornethack.rankin <nethack.rankin>
Thu, 28 Sep 2006 03:16:59 +0000 (03:16 +0000)
committernethack.rankin <nethack.rankin>
Thu, 28 Sep 2006 03:16:59 +0000 (03:16 +0000)
commit008366c2733979940855d769b1c4c52f8b4279c0
tree4bf4d263180ec3cf2f336df4d4fd3abc0da766de
parent171a28871cf8b5dfd89c0f0d94d0b6dcb931c38e
fix #h192 - missile which kills engulfer is in limbo when hero gets expelled (trunk only)

     More explicit control over the behavior of spoteffects() is probably
the way to go in the long run, but this much simpler fix handles the case
at hand.  I'm not sure what `thrownobj' was intended to be used for in the
first place, but it came in handy here.  (It was being left as a dangling
pointer when thitmonst() reports that the missile has been used up; that's
fixed now.)

    Fix the reported problem of lookhere/autopickup not seeing the missile
which just killed the engulfing monster whose death caused the hero to be
put back onto the map and so look/pickup upon arrival.  Normally the missile
gets placed after damage has been dealt and the throw has finished.  This
overrides that so that the missile is put into the engulfer's inventory as
it is being killed (which will then put that inventory onto the floor prior
to expelling the hero on top of same).  If the monster happens to get
life-saved it just ends up collecting the thrown-from-inside object a little
sooner than usual.

    This wouldn't correctly handle the same case for a kicked object, if
that were possible.  But it isn't possible to kick objects while engulfed,
so that's moot.  Other calls to thitmonst() and hmon() don't appear to have
any objects in transit so shouldn't need any comparable fix (I hope...).
doc/fixes35.0
src/dothrow.c
src/mon.c
src/uhitm.c