]> granicus.if.org Git - nethack/commitdiff
stopping occupation when missed
authorarromdee <arromdee>
Wed, 27 Feb 2002 02:29:33 +0000 (02:29 +0000)
committerarromdee <arromdee>
Wed, 27 Feb 2002 02:29:33 +0000 (02:29 +0000)
This fixes beta bug 3020.  It was hard to notice because the presence of a
monster in the room stops your occupation anyway, so it wasn't triggered unless
you were blind.

doc/fixes34.0
src/mhitu.c

index 374ab284c4abc4179de5408d8fe82faee60086c6..6f8ca3d405789afd4b724fbbef3d30957f994110 100644 (file)
@@ -446,6 +446,7 @@ slip while mounting and levitating at will should not cause damage
 if you see a monster jump into a trap in a secret corridor, it's not secret
 fixed a few places where unblock_point wasn't called but should have been
 cloned monsters should have the same name and tameness as the original
+you should stop eating (etc.) if a monster attacks you and misses
 
 
 Platform- and/or Interface-Specific Fixes
index 77b76a705d577b3ac63d6e150d53a854de0161d7..db03bbc911b1709cdda8da2384ae5803ffd7a616 100644 (file)
@@ -99,6 +99,7 @@ register struct attack *mattk;
            else
                pline("%s just misses!", Monnam(mtmp));
        }
+       stop_occupation();
 }
 
 STATIC_OVL void
@@ -1536,12 +1537,12 @@ do_stone:
            mdamageu(mtmp, dmg);
        }
 
-       if (dmg) {
+       if (dmg)
            res = passiveum(olduasmon, mtmp, mattk);
-           stop_occupation();
-           return res;
-       } else
-           return 1;
+       else
+           res = 1;
+       stop_occupation();
+       return res;
 }
 
 #endif /* OVL1 */