From 04b44dabd1b348dc60e2c9809d115cc6aad811f6 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Wed, 18 Dec 2024 23:00:13 +0700 Subject: [PATCH] umapinfo: finale handling improvements, cosmetic changes --- src/f_finale.c | 298 ++++++++++++++++++++++++++++++----------------- src/g_game.c | 50 ++++---- src/g_umapinfo.c | 104 ++++++++++------- src/g_umapinfo.h | 24 +++- src/mn_menu.c | 2 +- src/p_enemy.c | 86 ++++++++------ src/st_widgets.c | 3 +- src/wi_stuff.c | 4 +- 8 files changed, 359 insertions(+), 212 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index 9c817ccad..cd86f1c6a 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -45,8 +45,8 @@ // Stage of animation: // 0 = text, 1 = art screen, 2 = character cast -int finalestage; -int finalecount; +static int finalestage; +static int finalecount; // defines for the end mission display text // phares @@ -58,21 +58,182 @@ int finalecount; static const char *finaletext; static const char *finaleflat; -void F_StartCast (void); -void F_CastTicker (void); -boolean F_CastResponder (event_t *ev); -void F_CastDrawer (void); +static void F_StartCast(void); +static void F_CastTicker(void); +static boolean F_CastResponder(event_t *ev); +static void F_CastDrawer(void); +static void F_TextWrite(void); +static void F_BunnyScroll(void); +static float Get_TextSpeed(void); static int midstage; // whether we're in "mid-stage" -boolean using_FMI; +static boolean mapinfo_finale; + +static void MapInfo_StartFinale(musicenum_t music_id) +{ + mapinfo_finale = false; + + if (!gamemapinfo) + { + return; + } + + if (secretexit) + { + if (gamemapinfo->flags & MapInfo_InterTextSecretClear) + { + finaletext = NULL; + } + else if (gamemapinfo->intertextsecret) + { + finaletext = gamemapinfo->intertextsecret; + } + } + else + { + if (gamemapinfo->flags & MapInfo_InterTextClear) + { + finaletext = NULL; + } + else if (gamemapinfo->intertext) + { + finaletext = gamemapinfo->intertext; + } + } + + if (gamemapinfo->interbackdrop[0]) + { + finaleflat = gamemapinfo->interbackdrop; + } + + if (!finaleflat) + { + finaleflat = "FLOOR4_8"; // use a single fallback for all maps. + } + + int lumpnum = W_CheckNumForName(gamemapinfo->intermusic); + if (lumpnum >= 0) + { + S_ChangeMusInfoMusic(lumpnum, true); + } + else + { + S_ChangeMusic(music_id, true); + } + + mapinfo_finale = true; +} + +static boolean MapInfo_Ticker() +{ + if (!mapinfo_finale) + { + return false; + } + + boolean next_level = false; + + if (!demo_compatibility) + { + WI_checkForAccelerate(); + } + else + { + for (int i = 0; i < MAXPLAYERS; ++i) + { + if (players[i].cmd.buttons) + { + next_level = true; + } + } + } + + if (!next_level) + { + // advance animation + finalecount++; + + if (!finalestage) + { + int textcount = 0; + if (finaletext) + { + float speed = demo_compatibility ? TEXTSPEED : Get_TextSpeed(); + textcount = strlen(finaletext) * speed + + (midstage ? NEWTEXTWAIT : TEXTWAIT); + } + + if (!textcount || finalecount > textcount + || (midstage && acceleratestage)) + { + next_level = true; + } + } + } + + if (next_level) + { + if (!secretexit && gamemapinfo->flags & MapInfo_EndGame) + { + if (gamemapinfo->flags & MapInfo_EndGameCast) + { + F_StartCast(); + mapinfo_finale = false; + } + else + { + finalecount = 0; + finalestage = 1; + wipegamestate = -1; // force a wipe + if (gamemapinfo->flags & MapInfo_EndGameBunny) + { + S_StartMusic(mus_bunny); + } + else if (gamemapinfo->flags & MapInfo_EndGameStandard) + { + mapinfo_finale = false; + } + } + } + else + { + gameaction = ga_worlddone; // next level, e.g. MAP07 + } + } + + return true; +} + +static boolean MapInfo_Drawer(void) +{ + if (!mapinfo_finale) + { + return false; + } + + if (!finalestage && finaletext) + { + F_TextWrite(); + } + else if (gamemapinfo->flags & MapInfo_EndGameBunny) + { + F_BunnyScroll(); + } + else if (gamemapinfo->endpic[0]) + { + V_DrawPatchFullScreen(V_CachePatchName(gamemapinfo->endpic, PU_CACHE)); + } + + return true; +} // // F_StartFinale // void F_StartFinale (void) { - boolean mus_changed = false; + musicenum_t music_id = -1; gameaction = ga_nothing; gamestate = GS_FINALE; @@ -85,16 +246,6 @@ void F_StartFinale (void) finaletext = NULL; finaleflat = NULL; - if (gamemapinfo && gamemapinfo->intermusic[0]) - { - int l = W_CheckNumForName(gamemapinfo->intermusic); - if (l >= 0) - { - S_ChangeMusInfoMusic(l, true); - mus_changed = true; - } - } - // Okay - IWAD dependend stuff. // This has been changed severly, and // some stuff might have changed in the process. @@ -105,7 +256,7 @@ void F_StartFinale (void) case registered: case retail: { - if (!mus_changed) S_ChangeMusic(mus_victor, true); + music_id = mus_victor; switch (gameepisode) { @@ -135,7 +286,7 @@ void F_StartFinale (void) // DOOM II and missions packs with E1, M34 case commercial: { - if (!mus_changed) S_ChangeMusic(mus_read_m, true); + music_id = mus_read_m; // Ty 08/27/98 - added the gamemission logic @@ -182,49 +333,22 @@ void F_StartFinale (void) // Indeterminate. default: // Ty 03/30/98 - not externalized - if (!mus_changed) S_ChangeMusic(mus_read_m, true); + music_id = mus_read_m; finaleflat = "F_SKY1"; // Not used anywhere else. finaletext = s_C1TEXT; // FIXME - other text, music? break; } - using_FMI = false; - - if (gamemapinfo) - { - if (U_CheckField(gamemapinfo->intertextsecret) && secretexit) - { - finaletext = gamemapinfo->intertextsecret; - } - else if (U_CheckField(gamemapinfo->intertext) && !secretexit) - { - finaletext = gamemapinfo->intertext; - } - - if (!finaletext) - finaletext = "The End"; // this is to avoid a crash on a missing text in the last map. - - if (gamemapinfo->interbackdrop[0]) - { - finaleflat = gamemapinfo->interbackdrop; - } - - if (!finaleflat) - finaleflat = "FLOOR4_8"; // use a single fallback for all maps. - - using_FMI = true; - } + MapInfo_StartFinale(music_id); finalestage = 0; finalecount = 0; } - - boolean F_Responder (event_t *event) { if (finalestage == 2) - return F_CastResponder (event); + return F_CastResponder(event); return false; } @@ -238,7 +362,6 @@ static float Get_TextSpeed(void) acceleratestage=0, NEWTEXTSPEED : TEXTSPEED; } - // // F_Ticker // @@ -252,41 +375,18 @@ static float Get_TextSpeed(void) // killough 5/10/98: add back v1.9 demo compatibility // -static void FMI_Ticker() +void F_Ticker(void) { - if (U_CheckField(gamemapinfo->endpic)) + if (MapInfo_Ticker()) { - if (!strcasecmp(gamemapinfo->endpic, "$CAST")) - { - F_StartCast(); - using_FMI = false; - } - else - { - finalecount = 0; - finalestage = 1; - wipegamestate = -1; // force a wipe - if (!strcasecmp(gamemapinfo->endpic, "$BUNNY")) - { - S_StartMusic(mus_bunny); - } - else if (!strcasecmp(gamemapinfo->endpic, "!")) - { - using_FMI = false; - } - } + return; } - else - gameaction = ga_worlddone; // next level, e.g. MAP07 -} -void F_Ticker(void) -{ int i; if (!demo_compatibility) WI_checkForAccelerate(); // killough 3/28/98: check for acceleration else - if (gamemode == commercial && (using_FMI || finalecount > 50)) // check for skipping + if (gamemode == commercial && finalecount > 50) // check for skipping for (i=0; itype != ev_keydown && ev->type != ev_mouseb_down && ev->type != ev_joyb_down) return false; @@ -600,7 +692,7 @@ boolean F_CastResponder (event_t* ev) } -void F_CastPrint (char* text) +static void F_CastPrint(char* text) { char* ch; int c; @@ -654,7 +746,7 @@ void F_CastPrint (char* text) // F_CastDrawer // -void F_CastDrawer (void) +static void F_CastDrawer(void) { spritedef_t* sprdef; spriteframe_t* sprframe; @@ -683,7 +775,7 @@ void F_CastDrawer (void) // // F_BunnyScroll // -void F_BunnyScroll (void) +static void F_BunnyScroll(void) { int scrolled; patch_t* p1; @@ -759,21 +851,9 @@ void F_BunnyScroll (void) // void F_Drawer (void) { - if (using_FMI) + if (MapInfo_Drawer()) { - if (!finalestage) - { - F_TextWrite(); - } - else if (strcmp(gamemapinfo->endpic, "$BUNNY") == 0) - { - F_BunnyScroll(); - } - else - { - V_DrawPatchFullScreen(V_CachePatchName(gamemapinfo->endpic, PU_CACHE)); - } - return; + return; } if (finalestage == 2) diff --git a/src/g_game.c b/src/g_game.c index 919093510..789039282 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1085,7 +1085,7 @@ int G_GotoNextLevel(int *pEpi, int *pMap) next = gamemapinfo->nextsecret; else if (gamemapinfo->nextmap[0]) next = gamemapinfo->nextmap; - else if (U_CheckField(gamemapinfo->endpic)) + else if (gamemapinfo->flags & MapInfo_EndGame) { epsd = 1; map = 1; @@ -1693,9 +1693,9 @@ static void G_DoCompleted(void) const char *next = NULL; boolean intermission = false; - if (U_CheckField(gamemapinfo->endpic)) + if (gamemapinfo->flags & MapInfo_EndGame) { - if (gamemapinfo->nointermission) + if (gamemapinfo->flags & MapInfo_NoIntermission) { gameaction = ga_victory; return; @@ -3313,25 +3313,31 @@ void G_WorldDone(void) if (gamemapinfo) { - if (gamemapinfo->intertextsecret && secretexit) - { - if (U_CheckField(gamemapinfo->intertextsecret)) // if the intermission was not cleared - F_StartFinale(); - return; - } - else if (gamemapinfo->intertext && !secretexit) - { - if (U_CheckField(gamemapinfo->intertext)) // if the intermission was not cleared - F_StartFinale(); - return; - } - else if (U_CheckField(gamemapinfo->endpic) && !secretexit) - { - // game ends without a status screen. - gameaction = ga_victory; - return; - } - // if nothing applied, use the defaults. + if (secretexit) + { + if (gamemapinfo->intertextsecret + && !(gamemapinfo->flags & MapInfo_InterTextSecretClear)) + { + F_StartFinale(); + return; + } + } + else + { + if (gamemapinfo->intertext + && !(gamemapinfo->flags & MapInfo_InterTextClear)) + { + F_StartFinale(); + return; + } + else if (gamemapinfo->flags & MapInfo_EndGame) + { + // game ends without a status screen. + gameaction = ga_victory; + return; + } + } + // if nothing applied, use the defaults. } if (gamemode == commercial) diff --git a/src/g_umapinfo.c b/src/g_umapinfo.c index 7dc3fb7ff..931388e31 100644 --- a/src/g_umapinfo.c +++ b/src/g_umapinfo.c @@ -218,19 +218,6 @@ static char *ParseMultiString(scanner_t *s) { char *build = NULL; - if (SC_CheckToken(s, TK_Identifier)) - { - if (!strcasecmp(SC_GetString(s), "clear")) - { - // this was explicitly deleted to override the default. - return strdup("-"); - } - else - { - SC_Error(s, "Either 'clear' or string constant expected"); - } - } - do { SC_MustGetToken(s, TK_StringConst); @@ -284,7 +271,7 @@ static void ParseStandardProperty(scanner_t *s, mapentry_t *mape) { if (!strcasecmp(SC_GetString(s), "clear")) { - ReplaceString(&mape->label, "-"); + mape->flags |= MapInfo_LabelClear; } else { @@ -293,6 +280,7 @@ static void ParseStandardProperty(scanner_t *s, mapentry_t *mape) } else { + mape->flags &= ~MapInfo_LabelClear; SC_MustGetToken(s, TK_StringConst); ReplaceString(&mape->label, SC_GetString(s)); } @@ -374,6 +362,7 @@ static void ParseStandardProperty(scanner_t *s, mapentry_t *mape) } else if (!strcasecmp(prop, "endpic")) { + mape->flags |= MapInfo_EndGamePicture; ParseLumpName(s, mape->endpic); } else if (!strcasecmp(prop, "endcast")) @@ -381,11 +370,12 @@ static void ParseStandardProperty(scanner_t *s, mapentry_t *mape) SC_MustGetToken(s, TK_BoolConst); if (SC_GetBoolean(s)) { - strcpy(mape->endpic, "$CAST"); + mape->flags |= MapInfo_EndGameCast; } else { - strcpy(mape->endpic, "-"); + mape->flags &= ~MapInfo_EndGameCast; + mape->flags |= MapInfo_EndGameClear; } } else if (!strcasecmp(prop, "endbunny")) @@ -393,11 +383,12 @@ static void ParseStandardProperty(scanner_t *s, mapentry_t *mape) SC_MustGetToken(s, TK_BoolConst); if (SC_GetBoolean(s)) { - strcpy(mape->endpic, "$BUNNY"); + mape->flags |= MapInfo_EndGameBunny; } else { - strcpy(mape->endpic, "-"); + mape->flags &= ~MapInfo_EndGameBunny; + mape->flags |= MapInfo_EndGameClear; } } else if (!strcasecmp(prop, "endgame")) @@ -405,11 +396,12 @@ static void ParseStandardProperty(scanner_t *s, mapentry_t *mape) SC_MustGetToken(s, TK_BoolConst); if (SC_GetBoolean(s)) { - strcpy(mape->endpic, "!"); + mape->flags |= MapInfo_EndGameStandard; } else { - strcpy(mape->endpic, "-"); + mape->flags &= ~MapInfo_EndGameStandard; + mape->flags |= MapInfo_EndGameClear; } } else if (!strcasecmp(prop, "exitpic")) @@ -431,7 +423,14 @@ static void ParseStandardProperty(scanner_t *s, mapentry_t *mape) else if (!strcasecmp(prop, "nointermission")) { SC_MustGetToken(s, TK_BoolConst); - mape->nointermission = SC_GetBoolean(s); + if (SC_GetBoolean(s)) + { + mape->flags |= MapInfo_NoIntermission; + } + else + { + mape->flags &= ~MapInfo_NoIntermission; + } } else if (!strcasecmp(prop, "partime")) { @@ -440,21 +439,49 @@ static void ParseStandardProperty(scanner_t *s, mapentry_t *mape) } else if (!strcasecmp(prop, "intertext")) { - char *text = ParseMultiString(s); - if (mape->intertext) + if (SC_CheckToken(s, TK_Identifier)) + { + if (!strcasecmp(SC_GetString(s), "clear")) + { + mape->flags |= MapInfo_InterTextClear; + } + else + { + SC_Error(s, "Either 'clear' or string constant expected"); + } + } + else { - free(mape->intertext); + mape->flags &= ~MapInfo_InterTextClear; + if (mape->intertext) + { + free(mape->intertext); + } + mape->intertext = ParseMultiString(s); } - mape->intertext = text; } else if (!strcasecmp(prop, "intertextsecret")) { - char *text = ParseMultiString(s); - if (mape->intertextsecret) + if (SC_CheckToken(s, TK_Identifier)) + { + if (!strcasecmp(SC_GetString(s), "clear")) + { + mape->flags |= MapInfo_InterTextSecretClear; + } + else + { + SC_Error(s, "Either 'clear' or string constant expected"); + } + } + else { - free(mape->intertextsecret); + mape->flags &= ~MapInfo_InterTextSecretClear; + if (mape->intertextsecret) + { + free(mape->intertextsecret); + } + mape->intertextsecret = ParseMultiString(s); } - mape->intertextsecret = text; } else if (!strcasecmp(prop, "interbackdrop")) { @@ -469,11 +496,12 @@ static void ParseStandardProperty(scanner_t *s, mapentry_t *mape) SC_MustGetToken(s, TK_Identifier); if (!strcasecmp(SC_GetString(s), "clear")) { + mape->flags |= MapInfo_BossActionClear; array_free(mape->bossactions); - mape->nobossactions = true; // mark level free of boss actions } else { + mape->flags &= ~MapInfo_BossActionClear; int type, special, tag; for (type = 0; arrlen(actor_names); ++type) { @@ -549,30 +577,33 @@ void G_ParseMapInfo(int lumpnum) // Set default level progression here to simplify the checks elsewhere. // Doing this lets us skip all normal code for this if nothing has been // defined. - if (parsed.endpic[0] && (strcmp(parsed.endpic, "-") != 0)) + if (parsed.flags & MapInfo_EndGame) { parsed.nextmap[0] = 0; } - else if (!parsed.nextmap[0] && !parsed.endpic[0]) + else if (!parsed.nextmap[0] && !(parsed.flags & MapInfo_EndGameClear)) { if (!strcasecmp(parsed.mapname, "MAP30")) { - strcpy(parsed.endpic, "$CAST"); + parsed.flags |= MapInfo_EndGameCast; } else if (!strcasecmp(parsed.mapname, "E1M8")) { + parsed.flags |= MapInfo_EndGamePicture; strcpy(parsed.endpic, gamemode == retail ? "CREDIT" : "HELP2"); } else if (!strcasecmp(parsed.mapname, "E2M8")) { + parsed.flags |= MapInfo_EndGamePicture; strcpy(parsed.endpic, "VICTORY2"); } else if (!strcasecmp(parsed.mapname, "E3M8")) { - strcpy(parsed.endpic, "$BUNNY"); + parsed.flags |= MapInfo_EndGameBunny; } else if (!strcasecmp(parsed.mapname, "E4M8")) { + parsed.flags |= MapInfo_EndGamePicture; strcpy(parsed.endpic, "ENDPIC"); } else @@ -667,11 +698,6 @@ boolean G_ValidateMapName(const char *mapname, int *episode, int *map) return !strcmp(mapuname, lumpname); } -boolean U_CheckField(char *str) -{ - return str && str[0] && strcmp(str, "-"); -} - boolean G_IsSecretMap(int episode, int map) { level_t *level; diff --git a/src/g_umapinfo.h b/src/g_umapinfo.h index 80db1b3dc..2d0767472 100644 --- a/src/g_umapinfo.h +++ b/src/g_umapinfo.h @@ -23,6 +23,25 @@ #include "doomtype.h" +typedef enum +{ + MapInfo_LabelClear = (1u << 0), + + MapInfo_EndGamePicture = (1u << 2), + MapInfo_EndGameStandard = (1u << 3), + MapInfo_EndGameCast = (1u << 4), + MapInfo_EndGameBunny = (1u << 5), + MapInfo_EndGame = (MapInfo_EndGamePicture | MapInfo_EndGameStandard + | MapInfo_EndGameCast | MapInfo_EndGameBunny), + MapInfo_EndGameClear = (1u << 6), + + MapInfo_NoIntermission = (1u << 7), + MapInfo_InterTextClear = (1u << 8), + MapInfo_InterTextSecretClear = (1u << 9), + + MapInfo_BossActionClear = (1u << 10) +} mapinfo_flags_t; + typedef struct { int type; @@ -51,9 +70,8 @@ typedef struct mapentry_s char interbackdrop[9]; char intermusic[9]; int partime; - boolean nointermission; bossaction_t *bossactions; - boolean nobossactions; + mapinfo_flags_t flags; } mapentry_t; extern mapentry_t *umapinfo; @@ -64,8 +82,6 @@ mapentry_t *G_LookupMapinfo(int episode, int map); boolean G_ValidateMapName(const char *mapname, int *episode, int *map); -boolean U_CheckField(char *str); - void G_ParseMapInfo(int lumpnum); boolean G_IsSecretMap(int episode, int map); diff --git a/src/mn_menu.c b/src/mn_menu.c index 5f2a305ee..64dd2db8d 100644 --- a/src/mn_menu.c +++ b/src/mn_menu.c @@ -1314,7 +1314,7 @@ static void SetDefaultSaveName(char *name, const char *append) char *maplump = MapName(gameepisode, gamemap); int maplumpnum = W_CheckNumForName(maplump); - if (gamemapinfo && U_CheckField(gamemapinfo->label)) + if (gamemapinfo && gamemapinfo->label) { maplump = gamemapinfo->label; } diff --git a/src/p_enemy.c b/src/p_enemy.c index 31e1fed46..86f7af252 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -2285,52 +2285,70 @@ void A_BossDeath(mobj_t *mo) line_t junk; int i; - if (gamemapinfo && gamemapinfo->nobossactions) + if (gamemapinfo && gamemapinfo->flags & MapInfo_BossActionClear) + { return; + } if (gamemapinfo && array_size(gamemapinfo->bossactions)) { - // make sure there is a player alive for victory - for (i=0; i 0) - break; - - if (i==MAXPLAYERS) - return; // no one left alive, so do not end game + // make sure there is a player alive for victory + for (i = 0; i < MAXPLAYERS; i++) + { + if (playeringame[i] && players[i].health > 0) + { + break; + } + } + if (i == MAXPLAYERS) + { + return; // no one left alive, so do not end game + } - bossaction_t *bossaction; - array_foreach(bossaction, gamemapinfo->bossactions) - { - if (bossaction->type == mo->type) - break; - } - if (bossaction == array_end(gamemapinfo->bossactions)) - return; // no matches found + bossaction_t *bossaction; + array_foreach(bossaction, gamemapinfo->bossactions) + { + if (bossaction->type == mo->type) + { + break; + } + } + if (bossaction == array_end(gamemapinfo->bossactions)) + { + return; // no matches found + } - // scan the remaining thinkers to see - // if all bosses are dead - for (th = thinkercap.next ; th != &thinkercap ; th=th->next) - if (th->function.p1 == (actionf_p1)P_MobjThinker) + // scan the remaining thinkers to see + // if all bosses are dead + for (th = thinkercap.next; th != &thinkercap; th = th->next) { - mobj_t *mo2 = (mobj_t *) th; - if (mo2 != mo && mo2->type == mo->type && mo2->health > 0) - return; // other boss not dead + if (th->function.p1 == (actionf_p1)P_MobjThinker) + { + mobj_t *mo2 = (mobj_t *)th; + if (mo2 != mo && mo2->type == mo->type && mo2->health > 0) + { + return; // other boss not dead + } + } } - array_foreach(bossaction, gamemapinfo->bossactions) - { - if (bossaction->type == mo->type) + array_foreach(bossaction, gamemapinfo->bossactions) { - junk = *lines; - junk.special = (short)bossaction->special; - junk.tag = (short)bossaction->tag; - // use special semantics for line activation to block problem types. - if (!P_UseSpecialLine(mo, &junk, 0, true)) - P_CrossSpecialLine(&junk, 0, mo, true); + if (bossaction->type == mo->type) + { + junk = *lines; + junk.special = (short)bossaction->special; + junk.tag = (short)bossaction->tag; + // use special semantics for line activation to block problem + // types. + if (!P_UseSpecialLine(mo, &junk, 0, true)) + { + P_CrossSpecialLine(&junk, 0, mo, true); + } + } } - } - return; + return; } if (gamemode == commercial) diff --git a/src/st_widgets.c b/src/st_widgets.c index 63ff70455..0b4a0b8f7 100644 --- a/src/st_widgets.c +++ b/src/st_widgets.c @@ -594,10 +594,11 @@ void ST_ResetTitle(void) s = gamemapinfo->mapname; } - if (s == gamemapinfo->mapname || U_CheckField(s)) + if (!(gamemapinfo->flags & MapInfo_LabelClear)) { M_snprintf(string, sizeof(string), "%s: ", s); } + s = gamemapinfo->levelname; } else if (gamestate == GS_LEVEL) diff --git a/src/wi_stuff.c b/src/wi_stuff.c index 7ebba97eb..d4f7cd57c 100644 --- a/src/wi_stuff.c +++ b/src/wi_stuff.c @@ -1310,7 +1310,7 @@ static void WI_initShowNextLoc(void) if (gamemapinfo) { - if (gamemapinfo->endpic[0]) + if (gamemapinfo->flags & MapInfo_EndGame) { G_WorldDone(); return; @@ -1364,7 +1364,7 @@ static void WI_drawShowNextLoc(void) int i; int last; - if (gamemapinfo && U_CheckField(gamemapinfo->endpic)) + if (gamemapinfo && gamemapinfo->flags & MapInfo_EndGame) { return; }