teleport message sequencing

"You materialize at another location," was delivered while the
previous location still controlled line of sight.  Very noticeable
if you started from underwater and landed on the surface in an area
which hadn't been mapped yet.
This commit is contained in:
PatR
2020-04-08 15:17:02 -07:00
parent 69b4f0afc0
commit 27b1a153d3
2 changed files with 9 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 teleport.c $NHDT-Date: 1585211492 2020/03/26 08:31:32 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.118 $ */
/* NetHack 3.6 teleport.c $NHDT-Date: 1586384219 2020/04/08 22:16:59 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.122 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
@@ -368,10 +368,6 @@ int teleds_flags;
unplacebc(); /* to match placebc() below */
}
if (is_teleport && flags.verbose)
You("materialize in %s location!",
(nux == u.ux0 && nuy == u.uy0) ? "the same" : "a different");
/* must set u.ux, u.uy after drag_ball(), which may need to know
the old position if allow_drag is true... */
u_on_newpos(nux, nuy); /* set u.<x,y>, usteed-><mx,my>; cliparound() */
@@ -391,6 +387,12 @@ int teleds_flags;
g.vision_full_recalc = 1;
nomul(0);
vision_recalc(0); /* vision before effects */
/* this used to take place sooner, but if a --More-- prompt was issued
then the old map display was shown instead of the new one */
if (is_teleport && flags.verbose)
You("materialize in %s location!",
(nux == u.ux0 && nuy == u.uy0) ? "the same" : "a different");
/* if terrain type changes, levitation or flying might become blocked
or unblocked; might issue message, so do this after map+vision has
been updated for new location instead of right after u_on_newpos() */