vampshifting fog could vs door
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.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user