Fixes and sanity checks for monster undetected and trapped states
Adds sanity checks for mtrapped and mundetected states. Fixes cases where those were left in wrong state. 1. Trapped monster (eg. a nymph) teleported out of a trap 2. Monster was hiding under ball or chain, which then got removed 3. While restoring a level, a zombie corpse revived while monster was hiding under it 4. A general case where the only object was deleted off floor and a monster was hiding under it Monsters hiding under ball or chain will now get revealed when the b or c are moved.
This commit is contained in:
@@ -2175,6 +2175,10 @@ struct obj *obj;
|
||||
panic("dealloc_obj with nobj");
|
||||
if (obj->cobj)
|
||||
panic("dealloc_obj with cobj");
|
||||
if (obj == uball || obj == uchain)
|
||||
impossible("dealloc_obj called on %s, owornmask=%lx",
|
||||
(obj == uball) ? "uball" : "uchain",
|
||||
obj->owornmask);
|
||||
|
||||
/* free up any timers attached to the object */
|
||||
if (obj->timed)
|
||||
|
||||
Reference in New Issue
Block a user