failing level change messsage confusion
While testing the changes to dungeon and special level handling, I got |A mysterious force prevents you from descending! |You materialize on a different level! The mystery force is handled by goto_level() so level_tele() doesn't know that the failure is going to happen when it sets up the message for deferred delivery. Suppress the message if you don't change levels.
This commit is contained in:
+4
-1
@@ -1,4 +1,4 @@
|
|||||||
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.84 $ $NHDT-Date: 1580504296 2020/01/31 20:58:16 $
|
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.85 $ $NHDT-Date: 1580608377 2020/02/02 01:52:57 $
|
||||||
|
|
||||||
General Fixes and Modified Features
|
General Fixes and Modified Features
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
@@ -82,6 +82,9 @@ level teleporation's "You materialize on a different level!" could be given
|
|||||||
out of sequence with other arrival messages
|
out of sequence with other arrival messages
|
||||||
creating Mine Town variant 1 (Orcish Town) sometimes complained about being
|
creating Mine Town variant 1 (Orcish Town) sometimes complained about being
|
||||||
unable to place lregion type 1 and failed to have any staircase up
|
unable to place lregion type 1 and failed to have any staircase up
|
||||||
|
prevent "you materialize on a different level" after "a mysterious force
|
||||||
|
prevents you from descending" if you try to level teleport past the
|
||||||
|
stairs down from the quest home level before being granted access
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 do.c $NHDT-Date: 1580254093 2020/01/28 23:28:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.221 $ */
|
/* NetHack 3.6 do.c $NHDT-Date: 1580608377 2020/02/02 01:52:57 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.222 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -1781,10 +1781,11 @@ void
|
|||||||
deferred_goto()
|
deferred_goto()
|
||||||
{
|
{
|
||||||
if (!on_level(&u.uz, &u.utolev)) {
|
if (!on_level(&u.uz, &u.utolev)) {
|
||||||
d_level dest;
|
d_level dest, oldlev;
|
||||||
int typmask = u.utotype; /* save it; goto_level zeroes u.utotype */
|
int typmask = u.utotype; /* save it; goto_level zeroes u.utotype */
|
||||||
|
|
||||||
assign_level(&dest, &u.utolev);
|
assign_level(&dest, &u.utolev);
|
||||||
|
assign_level(&oldlev, &u.uz);
|
||||||
if (g.dfr_pre_msg)
|
if (g.dfr_pre_msg)
|
||||||
pline1(g.dfr_pre_msg);
|
pline1(g.dfr_pre_msg);
|
||||||
goto_level(&dest, !!(typmask & 1), !!(typmask & 2), !!(typmask & 4));
|
goto_level(&dest, !!(typmask & 1), !!(typmask & 2), !!(typmask & 4));
|
||||||
@@ -1796,7 +1797,7 @@ deferred_goto()
|
|||||||
newsym(u.ux, u.uy);
|
newsym(u.ux, u.uy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (g.dfr_post_msg)
|
if (g.dfr_post_msg && !on_level(&u.uz, &oldlev))
|
||||||
pline1(g.dfr_post_msg);
|
pline1(g.dfr_post_msg);
|
||||||
}
|
}
|
||||||
u.utotype = 0; /* our caller keys off of this */
|
u.utotype = 0; /* our caller keys off of this */
|
||||||
|
|||||||
Reference in New Issue
Block a user