]> granicus.if.org Git - nethack/commitdiff
B20008 - seeing pet move
authorcohrs <cohrs>
Sun, 2 Mar 2003 21:54:37 +0000 (21:54 +0000)
committercohrs <cohrs>
Sun, 2 Mar 2003 21:54:37 +0000 (21:54 +0000)
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.

doc/fixes35.0
src/dogmove.c

index 4d676b0c0125daf2bcf6f7f539377f579fc80ec6..d73c4ec5b31f4d3fa3689db68c7689aa426431ba 100644 (file)
@@ -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
index 070e46c0e83a20be0f18a96acc25c1175ca808df..0317f7822c21514e4d20880968c00ad436af5609 100644 (file)
@@ -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;