]> granicus.if.org Git - nethack/commitdiff
another unreachable message
authorcohrs <cohrs>
Wed, 20 Aug 2003 17:51:49 +0000 (17:51 +0000)
committercohrs <cohrs>
Wed, 20 Aug 2003 17:51:49 +0000 (17:51 +0000)
Correct the unreachable "snores" message From a bug report.
Applied to trunk only in hopes that beta8 might be the last for 3.4.2.
The fixes entry is generic since I'm sure other similar messages will be fixed.

doc/fixes35.0
src/shk.c

index 106c80edf8326e4e4b53453b0998d44f1b84fa22..1f3b81f8e3269c69b985cc2e9b2a3a22749d853b 100644 (file)
@@ -28,6 +28,7 @@ being confused and reading cursed scroll of charging drains your energy
 class genocide recognizes species name as an example of the class to
        genocide (Martin Snyder)
 internals: use Is_box rather than explicitly checking what it checks
+fix some unreachable messages (either make then reachable or remove them)
 
 
 Platform- and/or Interface-Specific Fixes
index 7137412a1e14a6923281a5ef607799965ba604fa..a3cdbb6f2590b91aac93762e0a72afec58e6bc16 100644 (file)
--- a/src/shk.c
+++ b/src/shk.c
@@ -2570,12 +2570,13 @@ xchar x, y;
                    dropped_container(obj, shkp, TRUE);
                if (!obj->unpaid)
                    obj->no_charge = 1;
-               if (!shkp->mcanmove) {
+               if (shkp->msleeping) {
+                   if(!rn2(3))
+                       pline("%s snores indifferently.", Monnam(shkp));
+               } else {
                    if(ANGRY(shkp) && !rn2(4))
                        pline("%s utters a curse.", Monnam(shkp));
                    else pline("%s is indisposed.", Monnam(shkp));
-               } else if(!rn2(3)) {
-                   pline("%s snores indifferently.", Monnam(shkp));
                }
                subfrombill(obj, shkp);
                return;