latent level arrival message bug (trunk only)
Something I noticed during a level change in slash'em:
You hear the sounds of civilization. You fly down the stairs.
The first message ought to follow the second. Our only arrival messages
that are handled via the special level loader occur in the endgame where
travel is by magic portal, and the transit message given for portals is
for entering one rather than exiting at the far side, so this sequencing
problem can't currently be noticed in nethack. But sooner or later there
will be levels reachable by stairs and having entry messages, or there'll
be some feedback added when magic portal transport finishes, and then we'd
get bitten by this.
Tested by adding an arrival message to each of the bigroom variants.
This commit is contained in:
@@ -123,6 +123,7 @@ candles should not be fireproof
|
||||
recognize most instances where hallucinatory monster name should be treated
|
||||
as a personal name (to avoid "the Barney") instead of a description
|
||||
avoid giving misleading or redundant feedback when reading scrolls
|
||||
custom arrival message for special levels could be delivered too soon
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
@@ -1082,6 +1082,7 @@ void FDECL(remove_rooms, (int,int,int,int));
|
||||
|
||||
E void FDECL(wallification, (int,int,int,int));
|
||||
E void FDECL(walkfrom, (int,int));
|
||||
E void NDECL(deliver_splev_message);
|
||||
E void FDECL(makemaz, (const char *));
|
||||
E void FDECL(mazexy, (coord *));
|
||||
E void NDECL(bound_digging);
|
||||
|
||||
5
src/do.c
5
src/do.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)do.c 3.5 2005/09/02 */
|
||||
/* SCCS Id: @(#)do.c 3.5 2006/02/15 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1308,6 +1308,9 @@ boolean at_stairs, falling, portal;
|
||||
* Move all plines beyond the screen reset.
|
||||
*/
|
||||
|
||||
/* special levels can have a custom arrival message */
|
||||
deliver_splev_message();
|
||||
|
||||
/* give room entrance message, if any */
|
||||
check_special_room(FALSE);
|
||||
|
||||
|
||||
24
src/mkmaze.c
24
src/mkmaze.c
@@ -475,21 +475,29 @@ fixup_special()
|
||||
}
|
||||
}
|
||||
|
||||
if(lev_message) {
|
||||
char *str, *nl;
|
||||
for(str = lev_message; (nl = index(str, '\n')) != 0; str = nl+1) {
|
||||
if (lregions)
|
||||
free((genericptr_t) lregions), lregions = 0;
|
||||
num_lregions = 0;
|
||||
}
|
||||
|
||||
/* special levels can include a custom arrival message; display it */
|
||||
void
|
||||
deliver_splev_message()
|
||||
{
|
||||
char *str, *nl;
|
||||
|
||||
/* this used to be inline within fixup_special(),
|
||||
but then the message ended up being given too soon */
|
||||
if (lev_message) {
|
||||
for (str = lev_message; (nl = index(str, '\n')) != 0; str = nl + 1) {
|
||||
*nl = '\0';
|
||||
pline("%s", str);
|
||||
}
|
||||
if(*str)
|
||||
if (*str)
|
||||
pline("%s", str);
|
||||
free((genericptr_t)lev_message);
|
||||
lev_message = 0;
|
||||
}
|
||||
|
||||
if (lregions)
|
||||
free((genericptr_t) lregions), lregions = 0;
|
||||
num_lregions = 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user