does so if no other choices have been picked; when any have (object
class or BUCX state or both), it auto-selects every item that matches
those choices (so still skips the second menu) rather than every item
+using travel to move one step diagonally where that step was blocked by being
+ too narrow to squeeze through stopped travel instead of considering
+ alternate routes to the destination
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
{
/* if travel to adjacent, reachable location, use normal movement rules */
if ((mode == TRAVP_TRAVEL || mode == TRAVP_VALID) && g.context.travel1
- && distmin(u.ux, u.uy, u.tx, u.ty) == 1
- && !(u.ux != u.tx && u.uy != u.ty && NODIAG(u.umonnum))) {
+ /* was '&& distmin(u.ux, u.uy, u.tx, u.ty) == 1' */
+ && distu(u.tx, u.ty) <= 2 /* one step away */
+ /* handle restricted diagonals */
+ && crawl_destination(u.tx, u.ty)) {
end_running(FALSE);
if (test_move(u.ux, u.uy, u.tx - u.ux, u.ty - u.uy, TEST_MOVE)) {
if (mode == TRAVP_TRAVEL) {
return !(lev_p->doormask & ~(D_NODOOR | D_BROKEN));
}
-/* used by drown() to check whether hero can crawl from water to <x,y> */
+/* used by drown() to check whether hero can crawl from water to <x,y>;
+ also used by findtravelpath() when destination is one step away */
boolean
crawl_destination(int x, int y)
{
all clear it too */
if (and_travel)
g.context.travel = g.context.travel1 = g.context.mv = 0;
-
- // Cancel mutli
- if (g.multi > 0)
+ /* cancel mutli */
+ if (g.multi > 0)
g.multi = 0;
}