Skip to content

Commit

Permalink
Fix not going to next map after text screen in some instances
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Nov 13, 2024
1 parent a34d3e8 commit 1bb196f
Showing 1 changed file with 17 additions and 37 deletions.
54 changes: 17 additions & 37 deletions src/f_finale.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ void F_StartFinale(void)
char *intertext = P_GetInterText(gameepisode, gamemap);
char *intersecret = P_GetInterSecretText(gameepisode, gamemap);

gameaction = ga_nothing;
gamestate = GS_FINALE;
viewactive = false;
automapactive = false;

Expand Down Expand Up @@ -151,13 +153,10 @@ void F_StartFinale(void)
}
else if (P_GetMapEndCast(gameepisode, gamemap))
{
gameaction = ga_nothing;
gamestate = GS_FINALE;
F_StartCast();

return;
}
else

// Okay - IWAD dependent stuff.
// This has been changed severely, and
// some stuff might have changed in the process.
Expand Down Expand Up @@ -272,9 +271,6 @@ void F_StartFinale(void)
return;
}

gameaction = ga_nothing;
gamestate = GS_FINALE;

finalestage = F_STAGE_TEXT;
finalecount = 0;

Expand Down Expand Up @@ -318,42 +314,26 @@ void F_Ticker(void)
if (finalecount > FixedMul((fixed_t)strlen(finaletext) * FRACUNIT, TextSpeed()) + (midstage ? NEWTEXTWAIT : TEXTWAIT)
|| (midstage && acceleratestage))
{
if (P_GetMapEndCast(gameepisode, gamemap))
F_StartCast();
else if (P_GetMapEndBunny(gameepisode, gamemap))
{
finalecount = 0;
finalestage = F_STAGE_ARTSCREEN;
wipegamestate = GS_NONE;
S_StartMusic(mus_bunny);
}
else if (P_GetMapEndGame(gameepisode, gamemap))
if (P_GetMapEndPic(gameepisode, gamemap) > 0)
{
finalecount = 0;
finalestage = F_STAGE_ARTSCREEN;
wipegamestate = GS_NONE;
}
else if (gamemode != commercial)
{
finalecount = 0;
finalestage = F_STAGE_ARTSCREEN;
wipegamestate = GS_NONE;

if (gameepisode == 3)
S_StartMusic(mus_bunny);
}
else if (midstage)
{
if ((gamemap == 30 && !P_GetMapNext(gameepisode, gamemap))
|| (gamemission == pack_nerve && gamemap == 8))
if (P_GetMapEndCast(gameepisode, gamemap))
F_StartCast();
else
{
viewplayer->attackdown = true;
viewplayer->usedown = true;
gameaction = ga_worlddone;
finalecount = 0;
finalestage = F_STAGE_ARTSCREEN;
wipegamestate = GS_NONE;

if (P_GetMapEndBunny(gameepisode, gamemap)
|| (gamemode != commercial && gameepisode == 3))
S_StartMusic(mus_bunny);
}
}
else if ((gamemap == 30 && !P_GetMapNext(gameepisode, gamemap))
|| (gamemission == pack_nerve && gamemap == 8))
F_StartCast();
else
gameaction = ga_worlddone;
}
}
}
Expand Down

0 comments on commit 1bb196f

Please sign in to comment.