]> granicus.if.org Git - nethack/commitdiff
polymorphed quest leader
authorarromdee <arromdee>
Mon, 21 Jan 2002 22:25:04 +0000 (22:25 +0000)
committerarromdee <arromdee>
Mon, 21 Jan 2002 22:25:04 +0000 (22:25 +0000)
Duuuh.  Of course adding objects already changed the editlevel.

Anyway, here's the fix I was working on.  It only matters in a very obscure
situation.  (Also, the quest leader still speaks no matter what he's
polymorphed into.)

src/mkobj.c

index b3592618db2d9bec1dd411d7f4c4269628e9cb74..041ad5934c3eb0464b7c832899f93e9414230acb 100644 (file)
@@ -963,8 +963,9 @@ struct monst *mtmp;
        if (otmp && otmp->oxlth) {
                struct monst *mtmp2 = (struct monst *)otmp->oextra;
                if (mtmp->data) mtmp2->mnum = monsndx(mtmp->data);
-               /* invalidate pointers and m_id */
-               mtmp2->m_id     = 0;
+               /* invalidate pointers */
+               /* m_id is needed to know if this is a revived quest leader */
+               /* but m_id must be cleared when loading bones */
                mtmp2->nmon     = (struct monst *)0;
                mtmp2->data     = (struct permonst *)0;
                mtmp2->minvent  = (struct obj *)0;