Disable emblem updates when RA mods are on

This commit is contained in:
NepDisk 2025-04-11 10:04:02 -04:00
parent e01b29ac09
commit f7cff08ae6
5 changed files with 34 additions and 6 deletions

View file

@ -504,6 +504,26 @@ tic_t G_GetBestLap(INT16 map)
}
*/
boolean K_EmblemsEnabled(void)
{
if (cv_dummyattackingrings.value)
return false;
if (cv_dummyattackingstacking.value)
return false;
if (cv_dummyattackingchaining.value)
return false;
if (cv_dummyattackingslipdash.value)
return false;
if (cv_dummyattackingpurpledrift.value)
return false;
return true;
}
//
// G_UpdateRecordReplays
//
@ -3882,8 +3902,9 @@ static void G_UpdateVisited(void)
if (modeattacking)
G_UpdateRecordReplays();
if ((earnedEmblems = M_CompletionEmblems()))
CONS_Printf(M_GetText("\x82" "Earned %hu emblem%s for level completion.\n"), (UINT16)earnedEmblems, earnedEmblems > 1 ? "s" : "");
// Unseal when we add more emblems
//if ((earnedEmblems = M_CompletionEmblems()))
//CONS_Printf(M_GetText("\x82" "Earned %hu emblem%s for level completion.\n"), (UINT16)earnedEmblems, earnedEmblems > 1 ? "s" : "");
}
static boolean CanSaveLevel(INT32 mapnum)

View file

@ -249,9 +249,11 @@ void G_SetGamestate(gamestate_t newstate);
boolean G_GamestateUsesLevel(void);
// Gamedata record shit
#define MAXMAPRECORDS 25
void G_AllocMainRecordData(INT16 i);
void G_ClearRecords(void);
boolean K_EmblemsEnabled(void);
tic_t G_GetBestTime(INT16 map);
FUNCMATH INT32 G_TicsToHours(tic_t tics);

View file

@ -1254,6 +1254,7 @@ void K_drawKartTimestamp(tic_t drawtime, INT32 TX, INT32 TY, INT16 emblemmap, UI
tic_t worktime;
boolean dontdraw = false;
boolean emblemenabled = K_EmblemsEnabled();
INT32 splitflags = 0;
if (!mode)
@ -1342,7 +1343,7 @@ void K_drawKartTimestamp(tic_t drawtime, INT32 TX, INT32 TY, INT16 emblemmap, UI
else if ((drawtime/TICRATE) & 1)
V_DrawKartString(TX, TY+3, splitflags, va("99'59\"99"));
if ((modeattacking || (mode == 1)) && !demo.playback) // emblem time!
if ((modeattacking || (mode == 1)) && emblemenabled && !demo.playback) // emblem time!
{
INT32 workx = TX + 96, worky = TY+18;
SINT8 curemb = 0;

View file

@ -359,6 +359,9 @@ UINT8 M_CheckLevelEmblems(void)
UINT8 res;
UINT8 somethingUnlocked = 0;
if (!K_EmblemsEnabled())
return false;
// Update Score, Time, Rings emblems
for (i = 0; i < numemblems; ++i)
{
@ -391,7 +394,8 @@ UINT8 M_CheckLevelEmblems(void)
return somethingUnlocked;
}
UINT8 M_CompletionEmblems(void) // Bah! Duplication sucks, but it's for a separate print when awarding emblems and it's sorta different enough.
// Unseal when we add more emblems
/*UINT8 M_CompletionEmblems(void) // Bah! Duplication sucks, but it's for a separate print when awarding emblems and it's sorta different enough.
{
INT32 i;
INT32 embtype;
@ -426,7 +430,7 @@ UINT8 M_CompletionEmblems(void) // Bah! Duplication sucks, but it's for a separa
++somethingUnlocked;
}
return somethingUnlocked;
}
}*/
// -------------------
// Quick unlock checks

View file

@ -164,7 +164,7 @@ UINT8 M_CheckCondition(condition_t *cn);
UINT8 M_UpdateUnlockablesAndExtraEmblems(void);
void M_SilentUpdateUnlockablesAndEmblems(void);
UINT8 M_CheckLevelEmblems(void);
UINT8 M_CompletionEmblems(void);
//UINT8 M_CompletionEmblems(void);
// Checking unlockable status
UINT8 M_AnySecretUnlocked(void);