]> granicus.if.org Git - nethack/commitdiff
Only reset if we actually went to travel destination
authorPasi Kallinen <paxed@alt.org>
Sat, 17 Oct 2020 09:13:17 +0000 (12:13 +0300)
committerPasi Kallinen <paxed@alt.org>
Sat, 17 Oct 2020 09:13:17 +0000 (12:13 +0300)
src/teleport.c

index 8157f512c9460119227fe92b73e78b9b29dd1de7..f23643aebf065332dd4432903ac524b422bdf9ae 100644 (file)
@@ -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...");