diff --git a/dat/opthelp b/dat/opthelp index 1048a19f9..e2170af78 100644 --- a/dat/opthelp +++ b/dat/opthelp @@ -64,8 +64,9 @@ status_updates update the status lines [TRUE] time display elapsed game time, in moves [FALSE] tombstone print tombstone when you die [TRUE] toptenwin print topten in a window rather than stdout [FALSE] -travel enable the command to travel to a map location via [TRUE] - a shortest-path algorithm, usually invoked by '_'. +travel enables travelling via mouse click if supported; [TRUE] + can be toggled off to prevent mouse clicks on the map from + attempting to move the hero; does not affect travel via '_' use_darkgray use bold black instead of blue for black glyphs. [TRUE] use_inverse display detected monsters in highlighted manner [FALSE] verbose print more commentary during the game [TRUE] diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index fd906d9c8..f4901601a 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -3771,9 +3771,11 @@ Setting this option makes the score list visible when a windowing version of NetHack is started without a parent window, but it no longer leaves the score list around after game end on a terminal or emulating window. .lp travel -Allow the travel command (default on). Turning this option off will -prevent the game from attempting unintended moves if you make inadvertent -mouse clicks on the map window. Persistent. +Allow the travel command via mouse click (default on). +Turning this option off will prevent the game from attempting unintended +moves if you make inadvertent mouse clicks on the map window. +Does not affect traveling via the \(oq\f(CR_\fP\(cq (\(lq#travel\(rq) command. +Persistent. ." .lp travel_debug ." Display intended path during each step of travel (default off). ." Debug mode only. diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 7caa15d8f..97eab4d24 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -4064,9 +4064,11 @@ of {\it NetHack\/} is started without a parent window, but it no longer leaves the score list around after game end on a terminal or emulating window. %.lp \item[\ib{travel}] -Allow the travel command (default on). Turning this option off will -prevent the game from attempting unintended moves if you make inadvertent -mouse clicks on the map window. Persistent. +Allow the travel command via mouse click (default on). +Turning this option off will prevent the game from attempting unintended +moves if you make inadvertent mouse clicks on the map window. +Does not affect traveling via the `{\tt \verb+_+}' (``{\tt \#travel}'') +command. Persistent. % %.lp % \item[ib{travel\verb+_+debug}] % Display intended path during each step of travel (default off). diff --git a/doc/fixes37.0 b/doc/fixes37.0 index d20c94caa..24682e324 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -142,6 +142,8 @@ new 'mention_decor' option; when On, describe dungeon features being stepped on or floated/flown over even when they're not covered by objects applying royal jelly on an egg kills, revives, or changes the egg intelligent monsters pick up and rummage through containers +toggling 'travel' option Off now only inhibits travel by mouse click, not by + '_' command where choosing the destination provides a chance to cancel Platform- and/or Interface-Specific New Features diff --git a/src/cmd.c b/src/cmd.c index a619b42a4..34bedb284 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -3162,15 +3162,12 @@ register char *cmd; } return; case NHKF_TRAVEL: - if (flags.travelcmd) { - g.context.travel = 1; - g.context.travel1 = 1; - g.context.run = 8; - g.context.nopick = 1; - g.domove_attempting |= DOMOVE_RUSH; - break; - } - /*FALLTHRU*/ + g.context.travel = 1; + g.context.travel1 = 1; + g.context.run = 8; + g.context.nopick = 1; + g.domove_attempting |= DOMOVE_RUSH; + break; default: if (movecmd(*cmd)) { /* ordinary movement */ g.context.run = 0; /* only matters here if it was 8 */ @@ -4302,14 +4299,16 @@ dotravel(VOID_ARGS) static char cmd[2]; coord cc; - /* [FIXME? Supporting the ability to disable traveling via mouse - click makes some sense, depending upon overall mouse usage. - Disabling '_' on a user by user basis makes no sense at all since - even if it is typed by accident, aborting when picking a target - destination is trivial. Travel via mouse predates travel via '_', - and this use of OPTION=!travel is probably just a mistake....] */ - if (!flags.travelcmd) - return 0; + /* + * Travelling used to be a no-op if user toggled 'travel' option + * Off. However, travel was initially implemented as a mouse-only + * command and the original purpose of the option was to be able + * to prevent clicks on the map from initiating travel. + * + * Travel via '_' came later. Since it requires a destination-- + * which offers the user a chance to cancel if it was accidental-- + * there's no reason for the option to disable travel-by-keys. + */ cmd[1] = 0; cc.x = iflags.travelcc.x;