diff --git a/src/g_game.c b/src/g_game.c index ca27ec5a..723d2b5e 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -6679,16 +6679,11 @@ void G_LoadDemoInfo(menudemo_t *pdemo) if (netid == cv_kartspeed.netid) { for (cvarcount = 0; kartspeed_cons_t[cvarcount].strvalue; cvarcount++) - { if (!stricmp(kartspeed_cons_t[cvarcount].strvalue, svalue)) - { pdemo->kartspeed = kartspeed_cons_t[cvarcount].value; - break; - } - } - - break; } + else if (netid == cv_basenumlaps.netid && pdemo->gametype == GT_RACE) + pdemo->numlaps = atoi(svalue); } if (pdemoflags & DF_ENCORE) diff --git a/src/g_game.h b/src/g_game.h index 324af06b..aa20dee4 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -79,6 +79,7 @@ typedef struct menudemo_s { UINT8 addonstatus; // What do we need to do addon-wise to play this demo? UINT8 gametype; UINT8 kartspeed; // Add OR DF_ENCORE for encore mode, idk + UINT8 numlaps; char winnername[17]; UINT8 winnerskin, winnercolor; diff --git a/src/m_menu.c b/src/m_menu.c index 5d4e0731..37902310 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -5300,6 +5300,9 @@ static void DrawReplayHutReplayInfo(void) else V_DrawString(x, y, V_ALLOWLOWERCASE|V_TRANSLUCENT, "Level is not loaded."); + if (demolist[dir_on[menudepthleft]].numlaps) + V_DrawThinString(x, y+9, V_ALLOWLOWERCASE, va("(%d laps)", demolist[dir_on[menudepthleft]].numlaps)); + V_DrawString(x, y+20, V_ALLOWLOWERCASE, demolist[dir_on[menudepthleft]].gametype == GT_RACE ? va("Race (%s speed)", kartspeed_cons_t[demolist[dir_on[menudepthleft]].kartspeed & ~DF_ENCORE].strvalue) : "Battle Mode");