diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 6180adf09..8d4a77b4b 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -342,6 +342,7 @@ lit candle or potion of oil which burned out while equipped would leave stale wielded/worn figurine which auto-transformed had same stale pointer bug format names of not yet id'd artifacts such that obj type shows for non-weapons make quest leader and nemesis be unlikely to be affected by traps +use a more precise jumping path for far, non-straight line destinations Platform- and/or Interface-Specific Fixes diff --git a/src/dothrow.c b/src/dothrow.c index 04abedddc..42bf9fbba 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -433,10 +433,10 @@ walk_path(src_cc, dest_cc, check_proc, arg) prev_x = x; prev_y = y; y += y_change; - err += dx; - if (err >= dy) { + err += dx << 1; + if (err > dy) { x += x_change; - err -= dy; + err -= dy << 1; } /* check for early exit condition */ if (!(keep_going = (*check_proc)(arg, x, y))) @@ -447,10 +447,10 @@ walk_path(src_cc, dest_cc, check_proc, arg) prev_x = x; prev_y = y; x += x_change; - err += dy; - if (err >= dx) { + err += dy << 1; + if (err > dx) { y += y_change; - err -= dx; + err -= dx << 1; } /* check for early exit condition */ if (!(keep_going = (*check_proc)(arg, x, y)))