From: Pasi Kallinen Date: Sat, 17 Oct 2020 09:13:17 +0000 (+0300) Subject: Only reset if we actually went to travel destination X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5ddafa5c81df07553b5ebe5bfc01e6502baec243;p=nethack Only reset if we actually went to travel destination --- diff --git a/src/teleport.c b/src/teleport.c index 8157f512c..f23643aeb 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -540,7 +540,8 @@ struct obj *scroll; if (teleok(cc.x, cc.y, FALSE)) { /* for scroll, discover it regardless of destination */ teleds(cc.x, cc.y, TELEDS_TELEPORT); - iflags.travelcc.x = iflags.travelcc.y = 0; + if (iflags.travelcc.x == cc.x && iflags.travelcc.y == cc.y) + iflags.travelcc.x = iflags.travelcc.y = 0; return; } pline("Sorry...");