]> granicus.if.org Git - nethack/commitdiff
clean up some code pasted from other function
authornhmall <nhmall@nethack.org>
Sat, 21 Apr 2018 10:57:52 +0000 (06:57 -0400)
committernhmall <nhmall@nethack.org>
Sat, 21 Apr 2018 10:57:52 +0000 (06:57 -0400)
src/trap.c

index b664ac56dd42a303d19e0f893482dec48a94909b..32128b9669cf94f22a7cd80308c01e81cf1770a8 100644 (file)
@@ -4929,12 +4929,7 @@ struct trap *adjtrap;
     
     for (idx = 0; idx < 8; idx++) {
         if (xdir[idx] == u.dx && ydir[idx] == u.dy)
-            break;
-    }
-    /* idx is valid if < 8 */
-    if (idx < 8) {
-        int adjidx = (idx + 4) % 8;
-        return TRUE;
+            return TRUE;
     }
     return FALSE;
 }