From f94d971c06b559a652659d7c94fa40b5f217bedb Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 26 Sep 2007 21:50:05 +0000 Subject: [PATCH] - Fixed: F_StartFinale shouldn't get the information if the game is about to end from level.nextmap. For example, this check is wrong for a secret exit. SVN r549 (trunk) --- docs/rh-log.txt | 5 +++++ src/f_finale.cpp | 7 ++++--- src/f_finale.h | 2 +- src/g_level.cpp | 9 ++++++--- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 95ce4949d..dc4c74606 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,8 @@ +September 26, 2007 (Changes by Graf Zahl) +- Fixed: F_StartFinale shouldn't get the information if the game is about + to end from level.nextmap. For example, this check is wrong for a secret + exit. + September 25, 2007 (Changes by Graf Zahl) - Fixed: AActor::CopyFriendliness must not copy the target if it has the MF3_NOTARGET flag set. diff --git a/src/f_finale.cpp b/src/f_finale.cpp index 2d8feedfc..dd9f73169 100644 --- a/src/f_finale.cpp +++ b/src/f_finale.cpp @@ -71,6 +71,7 @@ static bool FinaleHasPic; static FString FinaleText; static size_t FinaleTextLen; static const char *FinaleFlat; +static bool FinaleEnding; void F_StartCast (void); void F_CastTicker (void); @@ -82,9 +83,8 @@ void F_AdvanceSlideshow (); // F_StartFinale // void F_StartFinale (char *music, int musicorder, int cdtrack, unsigned int cdid, char *flat, char *text, - INTBOOL textInLump, INTBOOL finalePic, INTBOOL lookupText) + INTBOOL textInLump, INTBOOL finalePic, INTBOOL lookupText, bool ending) { - bool ending = strncmp (level.nextmap, "enDSeQ", 6) == 0; bool loopmusic = ending ? !(gameinfo.flags & GI_NOLOOPFINALEMUSIC) : true; gameaction = ga_nothing; gamestate = GS_FINALE; @@ -140,6 +140,7 @@ void F_StartFinale (char *music, int musicorder, int cdtrack, unsigned int cdid, FinaleCount = 0; FinaleEndCount = 70; FadeDir = -1; + FinaleEnding = ending; S_StopAllChannels (); if (ending) @@ -233,7 +234,7 @@ void F_Ticker () } else { - if (strncmp (level.nextmap, "enDSeQ", 6) == 0) + if (FinaleEnding) { // [RH] Don't automatically advance end-of-game messages if (interrupt) diff --git a/src/f_finale.h b/src/f_finale.h index 918f1fd2e..ad828c547 100644 --- a/src/f_finale.h +++ b/src/f_finale.h @@ -40,7 +40,7 @@ void F_Drawer (); void F_StartFinale (char *music, int musicorder, int cdtrack, unsigned int cdid, char *flat, char *text, - INTBOOL textInLump, INTBOOL finalePic, INTBOOL lookupText); + INTBOOL textInLump, INTBOOL finalePic, INTBOOL lookupText, bool ending); void F_StartSlideshow (); diff --git a/src/g_level.cpp b/src/g_level.cpp index a72204325..749eeb694 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -2042,7 +2042,8 @@ void G_WorldDone (void) thiscluster->finaleflat, thiscluster->exittext, thiscluster->flags & CLUSTER_EXITTEXTINLUMP, thiscluster->flags & CLUSTER_FINALEPIC, - thiscluster->flags & CLUSTER_LOOKUPEXITTEXT); + thiscluster->flags & CLUSTER_LOOKUPEXITTEXT, + true); } else { @@ -2059,7 +2060,8 @@ void G_WorldDone (void) nextcluster->finaleflat, nextcluster->entertext, nextcluster->flags & CLUSTER_ENTERTEXTINLUMP, nextcluster->flags & CLUSTER_FINALEPIC, - nextcluster->flags & CLUSTER_LOOKUPENTERTEXT); + nextcluster->flags & CLUSTER_LOOKUPENTERTEXT, + false); } else if (thiscluster->exittext) { @@ -2068,7 +2070,8 @@ void G_WorldDone (void) thiscluster->finaleflat, thiscluster->exittext, thiscluster->flags & CLUSTER_EXITTEXTINLUMP, thiscluster->flags & CLUSTER_FINALEPIC, - thiscluster->flags & CLUSTER_LOOKUPEXITTEXT); + thiscluster->flags & CLUSTER_LOOKUPEXITTEXT, + false); } } }