From a498ca732f73d28455cd0c0cf7d02cf9b1e7a610 Mon Sep 17 00:00:00 2001 From: Antonio Martinez Date: Tue, 26 Aug 2025 00:51:52 -0400 Subject: [PATCH] Legacy Proration, force "Leader" splits for Class R --- src/g_demo.cpp | 6 +++++- src/k_kart.c | 5 ++++- src/k_kart.h | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/g_demo.cpp b/src/g_demo.cpp index 9307cd93b..7c7a580ac 100644 --- a/src/g_demo.cpp +++ b/src/g_demo.cpp @@ -2344,6 +2344,10 @@ void G_SetDemoCheckpointTiming(player_t *player, tic_t time, UINT8 checkpoint) boolean polite = (cv_attacksplits.value == 1); + // Class R doesn't have coherent times, just watch the leader. + if (K_LegacyRingboost(player)) + polite = false; + // "Next" Mode: Find the weakest ghost who beats our best time. // Don't set a ghost if we have no set time (oldbest == UINT32_MAX) if (polite) @@ -3577,7 +3581,7 @@ void G_AddGhost(savebuffer_t *buffer, const char *defdemoname) p++; // SUBVERSION ghostversion = READUINT16(p); - + if (ghostversion < MINDEMOVERSION || ghostversion > DEMOVERSION) { // too old, cannot support. diff --git a/src/k_kart.c b/src/k_kart.c index 70257be0e..22454c30e 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3108,6 +3108,9 @@ fixed_t K_PlayerTripwireSpeedThreshold(const player_t *player) { fixed_t required_speed = 2 * K_GetKartSpeed(player, false, false); // 200% + if (K_LegacyRingboost(player)) + return required_speed; + if (specialstageinfo.valid) required_speed = 3 * K_GetKartSpeed(player, false, false) / 2; // 150% @@ -9484,7 +9487,7 @@ static inline BlockItReturn_t PIT_AttractingRings(mobj_t *thing) return BMIT_CONTINUE; // find other rings } -boolean K_LegacyRingboost(player_t *player) +boolean K_LegacyRingboost(const player_t *player) { if (netgame) return false; diff --git a/src/k_kart.h b/src/k_kart.h index e7f4c56c9..483800777 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -46,7 +46,7 @@ Make sure this matches the actual number of states #define BAIL_MAXCHARGE (84) // tics to bail when in painstate nad in air, on ground is half, if you touch this, also update Obj_BailChargeThink synced animation logic #define BAIL_DROP (FRACUNIT) -#define BAIL_BOOST (6*FRACUNIT/5) +#define BAIL_BOOST (6*FRACUNIT/5) #define BAIL_CREDIT_DEBTRINGS (true) #define BAIL_DROPFREQUENCY (2) #define BAILSTUN (TICRATE*6) @@ -348,7 +348,7 @@ UINT16 K_GetEXP(player_t *player); UINT32 K_GetNumGradingPoints(void); -boolean K_LegacyRingboost(player_t *player); +boolean K_LegacyRingboost(const player_t *player); void K_BotHitPenalty(player_t *player);