]> granicus.if.org Git - nethack/commit
buglist - full level triggers impossible() from migrating mons
authornethack.allison <nethack.allison>
Sat, 13 Sep 2003 05:30:43 +0000 (05:30 +0000)
committernethack.allison <nethack.allison>
Sat, 13 Sep 2003 05:30:43 +0000 (05:30 +0000)
commitcc830fb31157f9ac4027fee8b264b0989ce3a9ef
tree279b42617b52e1db894199fdf32817cfb68d2cb2
parent32b2af4abf644cccd8a43a9cec1d582552898ebf
buglist - full level triggers impossible() from migrating mons

<email deleted> wrote:
> If more monsters fall through a trap door than can fit on the
> level below, when you go down the stairs, you get the following
> message:
>  "Program in disorder - perhaps you'd better #quit.
>  rloc(): couldn't relocate monster"
> This message seems to appear once for every monster-too-many that
> fell through the hole. I originally found this while
> intentionally completely filling a level with black puddings
> (there was a trap door I didn't know about). I also confirmed it
> in a wiz-mode test using gremlins and water.

[confirmed: moveloop -> deferred_goto -> goto_level ->
 losedogs -> mon_arrive -> rloc -> impossible]

This patch:
- causes rloc() to return TRUE if successful,
  or FALSE if it wasn't.
- adds code to mon_arrive() in dog.c to deal with
  the failed rloc()
- allows the x,y parameters to mkcorpstat() to
  be 0,0 in order to trigger random placement of the
  corpse on the level
- if you define DEBUG_MIGRATING_MONS when you build cmd.c
  then you'll have a debug-mode command #migratemons to
  store the number of random monsters that you specify
  on the migrating monsters chain.
24 files changed:
doc/fixes34.3
include/extern.h
src/apply.c
src/cmd.c
src/dig.c
src/do.c
src/dog.c
src/dothrow.c
src/mhitm.c
src/mhitu.c
src/minion.c
src/mkmaze.c
src/mkobj.c
src/mon.c
src/monmove.c
src/mplayer.c
src/muse.c
src/priest.c
src/shknam.c
src/steal.c
src/steed.c
src/teleport.c
src/vault.c
src/wizard.c