Merge branch 'time-attack-annoyances' into 'master'

Time attack annoyances

Closes #1062 and #1064

See merge request KartKrew/Kart!1947
This commit is contained in:
Oni 2024-02-25 07:23:49 +00:00
commit 74bfac57e4
5 changed files with 27 additions and 32 deletions

View file

@ -212,7 +212,6 @@ unloaded_cupheader_t *unloadedcupheaders = NULL;
static boolean exitgame = false;
static boolean retrying = false;
static boolean retryingmodeattack = false;
UINT8 stagefailed; // Used for GEMS BONUS? Also to see if you beat the stage.
@ -1315,6 +1314,12 @@ boolean G_IsTitleCardAvailable(void)
if (K_PodiumSequence() == true)
return false;
// Mynd you, møøse bites Kan be pretty nasti...
if (modeattacking != ATTACKING_NONE && gametype != GT_VERSUS)
{
return false;
}
// The title card is available.
return true;
}
@ -1455,7 +1460,7 @@ boolean G_Responder(event_t *ev)
pausedelay = 1+(NEWTICRATE/2);
else if (++pausedelay > 1+(NEWTICRATE/2)+(NEWTICRATE/3))
{
G_SetModeAttackRetryFlag();
G_SetRetryFlag();
return true;
}
pausedelay++; // counteract subsequent subtraction this frame
@ -5444,20 +5449,9 @@ boolean G_GetRetryFlag(void)
return retrying;
}
void G_SetModeAttackRetryFlag(void)
boolean G_IsModeAttackRetrying(void)
{
retryingmodeattack = true;
G_SetRetryFlag();
}
void G_ClearModeAttackRetryFlag(void)
{
retryingmodeattack = false;
}
boolean G_GetModeAttackRetryFlag(void)
{
return retryingmodeattack;
return retrying && modeattacking != ATTACKING_NONE;
}
// Time utility functions

View file

@ -250,9 +250,7 @@ void G_SetRetryFlag(void);
void G_ClearRetryFlag(void);
boolean G_GetRetryFlag(void);
void G_SetModeAttackRetryFlag(void);
void G_ClearModeAttackRetryFlag(void);
boolean G_GetModeAttackRetryFlag(void);
boolean G_IsModeAttackRetrying(void);
void G_LoadGameData(void);
void G_LoadGameSettings(void);

View file

@ -429,10 +429,7 @@ void M_TryAgain(INT32 choice)
G_CheckDemoStatus(); // Cancel recording
M_StartTimeAttack(-1);
}
else
{
G_SetRetryFlag();
}
G_SetRetryFlag();
}
static void M_GiveUpResponse(INT32 ch)

View file

@ -8214,7 +8214,7 @@ void P_LoadLevelMusic(void)
{
const char *music = mapheaderinfo[gamemap-1]->musname[mapmusrng];
if (gametyperules & GTR_NOPOSITION)
if (gametyperules & GTR_NOPOSITION || modeattacking != ATTACKING_NONE)
{
if (!stricmp(Music_Song("level_nosync"), music))
{
@ -8367,14 +8367,10 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
// Special stage & record attack retry fade to white
// This is handled BEFORE sounds are stopped.
if (G_GetModeAttackRetryFlag())
if (G_IsModeAttackRetrying() && !demo.playback && gametype != GT_VERSUS)
{
if (modeattacking && !demo.playback)
{
ranspecialwipe = 2;
//wipestyleflags |= (WSF_FADEOUT|WSF_TOWHITE);
}
G_ClearModeAttackRetryFlag();
ranspecialwipe = 2;
//wipestyleflags |= (WSF_FADEOUT|WSF_TOWHITE);
}
// Make sure all sounds are stopped before Z_FreeTags.
@ -8414,7 +8410,6 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
if (ranspecialwipe == 2)
{
pausedelay = -3; // preticker plus one
S_StartSound(NULL, sfx_s3k73);
}
// We should be fine starting music here.

View file

@ -1039,7 +1039,18 @@ void P_Ticker(boolean run)
}
// POSITION!! music
P_StartPositionMusic(true); // exact times only
if (modeattacking == ATTACKING_NONE)
{
P_StartPositionMusic(true); // exact times only
}
}
}
if (modeattacking != ATTACKING_NONE)
{
if (leveltime == 4 && !Music_Playing("level_nosync"))
{
Music_Play("level_nosync");
}
}