Fix: travel from 'interesting' position

(including resuming travel after being interrupted)

Attempting to travel from an 'interesting' spot that would normally
stop travel mid-attempt (next to a door, next to a monster, etc) would
fail to get off the ground, because the 'interesting thing' would halt
travel before taking the first step.

Prior to 433f0cc, initiating travel would immediately trigger a call to
domove in rhack; as part of refactoring travel, the order of events in
rhack was changed so that this didn't happen immediately as before.  Add
domove to the end of dotravel_target to produce a similar effect to the
previous arrangement.

domove also zeroes out g.domove_attempting, which I think is the reason
c0c617c seemed to mitigate some of the issues associated with this
problem (e.g. travel target selection seemingly not registering right
away).

Fixes #559
This commit is contained in:
Michael Meyer
2021-08-11 09:08:17 -04:00
parent fdf0bfd8a4
commit 38d027d1f9
2 changed files with 1 additions and 1 deletions

View File

@@ -4734,6 +4734,7 @@ dotravel_target(void)
u.last_str_turn = 0;
g.context.mv = TRUE;
domove();
return 1;
}

View File

@@ -3007,7 +3007,6 @@ end_running(boolean and_travel)
if (flags.time && g.context.run)
iflags.time_botl = TRUE;
g.context.run = 0;
g.domove_attempting = 0;
/* 'context.mv' isn't travel but callers who want to end travel
all clear it too */
if (and_travel)