Fix inttime 0

Important testing apparatus while working on the previous commit
This commit is contained in:
toaster 2024-01-07 22:02:09 +00:00
parent cb133da7e2
commit 527492610a
2 changed files with 30 additions and 24 deletions

View file

@ -4374,26 +4374,27 @@ static void G_DoCompleted(void)
// If the current gametype has no intermission screen set, then don't start it. // If the current gametype has no intermission screen set, then don't start it.
Y_DetermineIntermissionType(); Y_DetermineIntermissionType();
if (intertype == int_none) if (intertype != int_none)
{ {
G_UpdateVisited();
if (grandprixinfo.gp == true)
{
K_UpdateGPRank(&grandprixinfo.rank);
}
G_AfterIntermission();
}
else
{
G_SetGamestate(GS_INTERMISSION);
Y_StartIntermission(); Y_StartIntermission();
G_UpdateVisited();
} }
else if (grandprixinfo.gp == true)
{
K_UpdateGPRank(&grandprixinfo.rank);
}
G_UpdateVisited();
// This isn't in the above blocks because many // This isn't in the above blocks because many
// mechanisms can queue up a gamedata save. // mechanisms can queue up a gamedata save.
if (gamedata->deferredsave) if (gamedata->deferredsave)
G_SaveGameData(); G_SaveGameData();
// Seperate from the above, as Y_StartIntermission can no-sell.
if (intertype == int_none)
{
G_AfterIntermission();
}
} }
// See also F_EndCutscene, the only other place which handles intra-map/ending transitions // See also F_EndCutscene, the only other place which handles intra-map/ending transitions

View file

@ -1982,10 +1982,7 @@ void Y_StartIntermission(void)
// determine the tic everybody's scores/PWR starts getting sorted // determine the tic everybody's scores/PWR starts getting sorted
sorttic = -1; sorttic = -1;
if (!timer) if (!timer)
{ ;
// Prevent a weird bug
timer = 1;
}
else if ( else if (
( // Match Race or Time Attack ( // Match Race or Time Attack
netgame == false netgame == false
@ -2033,11 +2030,6 @@ void Y_StartIntermission(void)
if (prevmap >= nummapheaders || !mapheaderinfo[prevmap]) if (prevmap >= nummapheaders || !mapheaderinfo[prevmap])
I_Error("Y_StartIntermission: Internal map ID %d not found (nummapheaders = %d)", prevmap, nummapheaders); I_Error("Y_StartIntermission: Internal map ID %d not found (nummapheaders = %d)", prevmap, nummapheaders);
if (timer > 1 && musiccountdown == 0)
Music_Play("intermission");
S_ShowMusicCredit(); // Always call
switch (intertype) switch (intertype)
{ {
case int_score: case int_score:
@ -2058,9 +2050,6 @@ void Y_StartIntermission(void)
break; break;
} }
LUA_HUD_DestroyDrawList(luahuddrawlist_intermission);
luahuddrawlist_intermission = LUA_HUD_CreateDrawList();
if (powertype != PWRLV_DISABLED) if (powertype != PWRLV_DISABLED)
{ {
for (i = 0; i < MAXPLAYERS; i++) for (i = 0; i < MAXPLAYERS; i++)
@ -2078,6 +2067,22 @@ void Y_StartIntermission(void)
SV_BumpMatchStats(); SV_BumpMatchStats();
} }
if (!timer)
{
Y_EndIntermission();
return;
}
G_SetGamestate(GS_INTERMISSION);
if (musiccountdown == 0)
Music_Play("intermission");
S_ShowMusicCredit(); // Always call
LUA_HUD_DestroyDrawList(luahuddrawlist_intermission);
luahuddrawlist_intermission = LUA_HUD_CreateDrawList();
if (roundqueue.size > 0 && roundqueue.position == roundqueue.size) if (roundqueue.size > 0 && roundqueue.position == roundqueue.size)
{ {
Automate_Run(AEV_QUEUEEND); Automate_Run(AEV_QUEUEEND);