]> granicus.if.org Git - nethack/commitdiff
digactualhole() bit
authornethack.allison <nethack.allison>
Sun, 19 Mar 2006 23:13:11 +0000 (23:13 +0000)
committernethack.allison <nethack.allison>
Sun, 19 Mar 2006 23:13:11 +0000 (23:13 +0000)
I'm pretty sure this check at_u should be included since x,y
can be passed to digactualhole().  The lack of any related
bug reports suggest that at_u is currently always
true for any code that calls digactualhole().

doc/fixes34.4
src/dig.c

index 80c9e06fbbe38af8679bf15897128335d1beef4c..ac45b237ee480a6bb0f99d68f1424e41d3f7f367 100644 (file)
@@ -201,6 +201,7 @@ use "your kraken" instead of "a kraken" when searching reveals a tame
 Magicbane should not produce "<something> are confused" message
 handle antholes more sensibly when ants aren't available
 cancelled nurses shouldn't say "Relax, this won't hurt a bit"
+check for hero location in digactualhole() before clearing u.utrap
 
 
 Platform- and/or Interface-Specific Fixes
index 4a2cd240a4778853c90e8cb24cc530924cc2777a..0533523f0abb977db5b501080bcb7d842adfcadb 100644 (file)
--- a/src/dig.c
+++ b/src/dig.c
@@ -488,7 +488,7 @@ int ttyp;
        boolean at_u = (x == u.ux) && (y == u.uy);
        boolean wont_fall = Levitation || Flying;
 
-       if (u.utrap) {
+       if (at_u && u.utrap) {
            if (u.utraptype == TT_BURIEDBALL) buried_ball_to_punishment();
            else if (u.utraptype == TT_INFLOOR) u.utrap = 0;
        }