fix #Q251 - reading engravings while asleep
From a bug report, floating down onto an engraving due to levitation timeout would yield "You read: <engraving text>" even if you were asleep at the time. Random teleport while asleep could produce a similar result. The problem was actually a little bigger: you'd also get "You see <object> here" if there was an object instead of or in addition to an engraving.
This commit is contained in:
@@ -113,6 +113,8 @@ reduced message verbosity when monster with multiple attacks missed wildly
|
|||||||
zapping a never seen wand while blinded won't make the wand a discovery
|
zapping a never seen wand while blinded won't make the wand a discovery
|
||||||
zapping an unID'd wand of teleportation at self will discover it (usually)
|
zapping an unID'd wand of teleportation at self will discover it (usually)
|
||||||
zapping unlocking magic at self while punished will remove attached chain
|
zapping unlocking magic at self while punished will remove attached chain
|
||||||
|
don't see objects or read engraving when hero changes location (random
|
||||||
|
teleport) or position (levitation timeout) while asleep or fainted
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+8
-1
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)pickup.c 3.5 2005/12/07 */
|
/* SCCS Id: @(#)pickup.c 3.5 2006/02/03 */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -424,6 +424,13 @@ int what; /* should be a long */
|
|||||||
struct obj *objchain;
|
struct obj *objchain;
|
||||||
int traverse_how;
|
int traverse_how;
|
||||||
|
|
||||||
|
/* we might have arrived here while fainted or sleeping, via
|
||||||
|
random teleport or levitation timeout; if so, skip check_here
|
||||||
|
and read_engr_at in addition to bypassing autopickup itself
|
||||||
|
[probably ought to check whether hero is using a cockatrice
|
||||||
|
corpse for a pillow here... (also at initial faint/sleep)] */
|
||||||
|
if (autopickup && multi < 0 && unconscious()) return 0;
|
||||||
|
|
||||||
if (what < 0) /* pick N of something */
|
if (what < 0) /* pick N of something */
|
||||||
count = -what;
|
count = -what;
|
||||||
else /* pick anything */
|
else /* pick anything */
|
||||||
|
|||||||
Reference in New Issue
Block a user