]> granicus.if.org Git - nethack/commitdiff
B04002 fix for misplaced pet loyalty
authornethack.allison <nethack.allison>
Sun, 6 Jul 2003 14:13:06 +0000 (14:13 +0000)
committernethack.allison <nethack.allison>
Sun, 6 Jul 2003 14:13:06 +0000 (14:13 +0000)
<Someone> wrote:
>This _must_ be a bug: if a character leaves a pet corpse in a
>bonesfile, someone getting those bones will receive
>"So this is how you repay loyalty?"  should he sacrifice it, even
>though the loyalty wasn't shown to _him_."

Clear the appropriate fields from the attached monst structure
when loading bones.

doc/fixes34.2
src/restore.c

index 436409b408c5e8be2f67b852d0c424251acd0e44..a041b47c06d6eb855f36ebd3baf5d1dba730929a 100644 (file)
@@ -99,6 +99,7 @@ stethoscope use should be free the first time it's use per player move
 travel command caches last position to make non-mouse less painful
 update pit trapped time when polymorphing to or from a monster that passes_walls
 show artifact hit message which affect the monster that swallowed the hero
+revived pet corpse from bones file should not be loyal to current player
 
 
 Platform- and/or Interface-Specific Fixes
index aabcad5aac3c2e7f4c8ccb979eda46a64dce4417..2ad6617d60b145c60b43d0ad7ebe10ae03189a9f 100644 (file)
@@ -974,6 +974,7 @@ boolean ghostly;
            struct monst *mtmp = (struct monst *)otmp->oextra;
 
            mtmp->m_id = 0;
+           mtmp->mpeaceful = mtmp->mtame = 0;  /* pet's owner died! */
        }
        if (ghostly && otmp->oattached == OATTACHED_M_ID) {
            (void) memcpy((genericptr_t)&oldid, (genericptr_t)otmp->oextra,