Only reset if we actually went to travel destination

This commit is contained in:
Pasi Kallinen
2020-10-17 12:13:17 +03:00
parent a9e4904131
commit 5ddafa5c81
+1
View File
@@ -540,6 +540,7 @@ struct obj *scroll;
if (teleok(cc.x, cc.y, FALSE)) { if (teleok(cc.x, cc.y, FALSE)) {
/* for scroll, discover it regardless of destination */ /* for scroll, discover it regardless of destination */
teleds(cc.x, cc.y, TELEDS_TELEPORT); teleds(cc.x, cc.y, TELEDS_TELEPORT);
if (iflags.travelcc.x == cc.x && iflags.travelcc.y == cc.y)
iflags.travelcc.x = iflags.travelcc.y = 0; iflags.travelcc.x = iflags.travelcc.y = 0;
return; return;
} }