\#retravel feedback
Using #retravel when no destination was set up just silenty finished, effectively a no-op. Could happen for the first travel attempt on the current dungeon level, or after most recent #travel successfully reached and cleared its destination. Using #retravel when already at previously set but unreached--via travel--destination, or explicitly picking your own spot as travel destination using #travel, actually traveled from your current spot to the same spot. Usually nothing interesting occurred and you got no feedback. However, if you happened to be stuck in a trap at that spot you tried to walk out of it and got trap feedback about that. (Then probably right back into the trap if you succeeded in escaping it. I didn't try to test that.)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 cmd.c $NHDT-Date: 1671222065 2022/12/16 20:21:05 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.650 $ */
|
/* NetHack 3.7 cmd.c $NHDT-Date: 1678312816 2023/03/08 22:00:16 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.666 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -6475,7 +6475,7 @@ dotravel(void)
|
|||||||
coord cc;
|
coord cc;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Travelling used to be a no-op if user toggled 'travel' option
|
* Traveling used to be a no-op if user toggled 'travel' option
|
||||||
* Off. However, travel was initially implemented as a mouse-only
|
* Off. However, travel was initially implemented as a mouse-only
|
||||||
* command and the original purpose of the option was to be able
|
* command and the original purpose of the option was to be able
|
||||||
* to prevent clicks on the map from initiating travel.
|
* to prevent clicks on the map from initiating travel.
|
||||||
@@ -6521,8 +6521,17 @@ dotravel(void)
|
|||||||
static int
|
static int
|
||||||
dotravel_target(void)
|
dotravel_target(void)
|
||||||
{
|
{
|
||||||
if (!isok(iflags.travelcc.x, iflags.travelcc.y))
|
if (!isok(iflags.travelcc.x, iflags.travelcc.y)) {
|
||||||
|
/* assume <0,0>, the value assigned when travel reaches destination */
|
||||||
|
pline("No travel destination set.");
|
||||||
return ECMD_OK;
|
return ECMD_OK;
|
||||||
|
} else if (u_at(iflags.travelcc.x, iflags.travelcc.y)) {
|
||||||
|
/* maybe interrupted while traveling then just walked rest of way
|
||||||
|
so destination hasn't been reset yet */
|
||||||
|
You("are already here.");
|
||||||
|
iflags.travelcc.x = iflags.travelcc.y = 0;
|
||||||
|
return ECMD_OK;
|
||||||
|
}
|
||||||
|
|
||||||
iflags.getloc_travelmode = FALSE;
|
iflags.getloc_travelmode = FALSE;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user