]> granicus.if.org Git - nethack/commitdiff
R06006 - travel command infinite loop
authorcohrs <cohrs>
Sun, 4 Aug 2002 23:04:56 +0000 (23:04 +0000)
committercohrs <cohrs>
Sun, 4 Aug 2002 23:04:56 +0000 (23:04 +0000)
The problem was caused by a test that was added to test_move() to test the
move as a regular move if it was the next step.  This case affected
boulders and closed doors, both of which are handled in later in do_move().
Remove the check.  I think this was something I thought was needed for an
intermediary version of the travel command fix, but turned out to be
detrimental in the current version.

src/hack.c

index fc74aa9e27372cbb0d9fa2936b0ed920106ad801..c5a83099f41b219690bcf55c136d25dac345c7bd 100644 (file)
@@ -539,9 +539,6 @@ int mode;
     register struct rm *tmpr = &levl[x][y];
     register struct rm *ust;
 
-    /* if this is the next step, must treat as if TEST_MOVE were used */
-    if (mode == TEST_TRAV && distmin(x, y, u.ux, u.uy) <= 1) mode = TEST_MOVE;
-
     /*
      *  Check for physical obstacles.  First, the place we are going.
      */