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/g_game.c b/src/g_game.c index 2f84b4ef0..71bd8a6a2 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -588,10 +588,9 @@ static void G_UpdateRecordReplays(void) { modeprefix = "spb-"; } - - if (K_LegacyRingboost(&players[consoleplayer])) + else if (K_LegacyRingboost(&players[consoleplayer])) { - modeprefix = "classr-"; + modeprefix = "hivolt-"; } if (players[consoleplayer].pflags & PF_NOCONTEST) diff --git a/src/k_kart.c b/src/k_kart.c index e63ec0f48..1fe6f4c3c 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,13 +9487,13 @@ 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; if (modeattacking == ATTACKING_SPB) return false; - if (!modeattacking) + if (!modeattacking || (modeattacking & ATTACKING_SPB)) return false; if (!(skins[player->skin]->flags & SF_HIVOLT)) 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); diff --git a/src/menus/play-local-race-time-attack.c b/src/menus/play-local-race-time-attack.c index 7ac7343bf..4c6569217 100644 --- a/src/menus/play-local-race-time-attack.c +++ b/src/menus/play-local-race-time-attack.c @@ -461,7 +461,17 @@ void M_ReplayTimeAttack(INT32 choice) const char *modeprefix = ""; if (cv_dummyspbattack.value) + { modeprefix = "spb-"; + } + else + { + const INT32 skinid = R_SkinAvailableEx(cv_skin[0].string, false); + if (skinid >= 0 && (skins[skinid]->flags & SF_HIVOLT)) + { + modeprefix = "hivolt-"; + } + } switch (choice) { @@ -521,7 +531,17 @@ static void M_WriteGuestReplay(INT32 ch) const char *modeprefix = ""; if (cv_dummyspbattack.value) + { modeprefix = "spb-"; + } + else + { + const INT32 skinid = R_SkinAvailableEx(cv_skin[0].string, false); + if (skinid >= 0 && (skins[skinid]->flags & SF_HIVOLT)) + { + modeprefix = "hivolt-"; + } + } if (TA_GuestReplay_Str != NULL) { @@ -580,7 +600,17 @@ void M_SetGuestReplay(INT32 choice) const char *modeprefix = ""; if (cv_dummyspbattack.value) + { modeprefix = "spb-"; + } + else + { + const INT32 skinid = R_SkinAvailableEx(cv_skin[0].string, false); + if (skinid >= 0 && (skins[skinid]->flags & SF_HIVOLT)) + { + modeprefix = "hivolt-"; + } + } if (FIL_FileExists(va("%s"PATHSEP"media"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s-%sguest.lmp", srb2home, timeattackfolder, G_BuildMapName(levellist.choosemap+1), modeprefix))) { @@ -622,6 +652,14 @@ void M_StartTimeAttack(INT32 choice) modeprefix = "spb-"; } + else + { + const INT32 skinid = R_SkinAvailableEx(cv_skin[0].string, false); + if (skinid >= 0 && (skins[skinid]->flags & SF_HIVOLT)) + { + modeprefix = "hivolt-"; + } + } // DON'T SOFTLOCK CON_ToggleOff(); diff --git a/src/p_setup.cpp b/src/p_setup.cpp index d62ce2b15..e011031e0 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -7842,7 +7842,17 @@ static void P_LoadRecordGhosts(void) gpath = Z_StrDup(va("%s" PATHSEP "media" PATHSEP "replay" PATHSEP "%s" PATHSEP "%s", srb2home, timeattackfolder, G_BuildMapName(gamemap))); if (encoremode) - modeprefix = "spb-"; + { + modeprefix = "-spb"; + } + else + { + const INT32 skinid = R_SkinAvailableEx(cv_skin[0].string, false); + if (skinid >= 0 && (skins[skinid]->flags & SF_HIVOLT)) + { + modeprefix = "-hivolt"; + } + } enum {