]> granicus.if.org Git - nethack/commitdiff
vampshifting fog could vs door
authorPatR <rankin@nethack.org>
Sun, 4 Jun 2017 00:05:40 +0000 (17:05 -0700)
committerPatR <rankin@nethack.org>
Sun, 4 Jun 2017 00:05:40 +0000 (17:05 -0700)
Noticed while composing a reply to the #H5547 report about named
vampire shape-shift message.  The message when a vampire (possibly
in vampire bat form) turned into a fog cloud in order to pass under
a closed door was using a stale cached mon->data value when choosing
the verb.  So normal fog cloud or vampire already in fog cloud shape
would "flow" under the door, but newly shifted fog cloud would "ooze"
under the door.  I saw this while testing the previous patch but its
significance didn't register at the time.

doc/fixes36.1
src/monmove.c

index 5f13a649c8961315fb5f1bbfbe78b7207a403d42..d010c25419fc8ed047179cef2106456559c5cdfc 100644 (file)
@@ -391,6 +391,7 @@ poor message when shape-shifted vampire reverts if cause of 'death' was
        used for amorphous form, "reconstitute" rather than "transform")
 poor message when named vampire shifts shape within view:
        You observe a Dracula where a Dracula was.
+vampire shifting into fog cloud to pass under door "oozed" rather than "flowed"
 adult green dragons and the Chromatic Dragon were blinded by gas clouds
 
 
index ece138bba80c7a2385d779fb5fd32a74f1d54bd3..92cdac8dd1f6115479d3bf66b32a371442aa848f 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 monmove.c       $NHDT-Date: 1496531115 2017/06/03 23:05:15 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.90 $ */
+/* NetHack 3.6 monmove.c       $NHDT-Date: 1496534703 2017/06/04 00:05:03 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.91 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1250,10 +1250,12 @@ postmov:
                         || (can_fog(mtmp)
                             && vamp_shift(mtmp, &mons[PM_FOG_CLOUD],
                                           canspotmon(mtmp))))) {
+                    /* update cached value for vamp_shift() case */
+                    ptr = mtmp->data;
                     if (flags.verbose && canseemon(mtmp))
                         pline("%s %s under the door.", Monnam(mtmp),
                               (ptr == &mons[PM_FOG_CLOUD]
-                               || ptr == &mons[PM_YELLOW_LIGHT])
+                               || ptr->mlet == S_LIGHT)
                                   ? "flows"
                                   : "oozes");
                 } else if (here->doormask & D_LOCKED && can_unlock) {