From: cohrs Date: Sun, 2 Mar 2003 21:54:37 +0000 (+0000) Subject: B20008 - seeing pet move X-Git-Tag: MOVE2GIT~2115 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=77c538e164f5b12ebc5a15c763c7b62780dcfb81;p=nethack B20008 - seeing pet move The cansee() checks are not really correct for seeing your pet move. Changed them to a pair of canseemon() checks, one before the move, one after. I can see an argument for canspotmon(), but decided to keep it based on sight. If your pet is unseen in both locations, you won't get any messages, which I think is more correct. If you do get the message, use noit_Monnam to ensure no more "it" message. --- diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 4d676b0c0..d73c4ec5b 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -6,6 +6,7 @@ setmangry should not be called when a monster enters a bones region typos fixed in data.base bad capitalization of msg when charging for something that catches light missing opthelp for use_inverse +Never say "It moves only reluctantly" Platform- and/or Interface-Specific Fixes diff --git a/src/dogmove.c b/src/dogmove.c index 070e46c0e..0317f7822 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -705,6 +705,7 @@ register int after; /* this is extra fast monster movement */ newdogpos: if (nix != omx || niy != omy) { struct obj *mw_tmp; + boolean wasseen; if (info[chi] & ALLOW_U) { if (mtmp->mleashed) { /* play it safe */ @@ -736,10 +737,11 @@ newdogpos: return 0; } /* insert a worm_move() if worms ever begin to eat things */ + wasseen = canseemon(mtmp); remove_monster(omx, omy); place_monster(mtmp, nix, niy); - if (cursemsg[chi] && (cansee(omx,omy) || cansee(nix,niy))) - pline("%s moves only reluctantly.", Monnam(mtmp)); + if (cursemsg[chi] && (wasseen || canseemon(mtmp))) + pline("%s moves only reluctantly.", noit_Monnam(mtmp)); for (j=MTSZ-1; j>0; j--) mtmp->mtrack[j] = mtmp->mtrack[j-1]; mtmp->mtrack[0].x = omx; mtmp->mtrack[0].y = omy;