diff --git a/src/doomstat.h b/src/doomstat.h index ad0ea996..65548a8f 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -422,8 +422,7 @@ extern UINT8 maxXtraLife; // Max extra lives from rings extern mobj_t *hunt1, *hunt2, *hunt3; // Emerald hunt locations // For racing -extern UINT32 countdown; -extern UINT32 countdown2; +extern UINT32 countdown, countdown2; extern fixed_t gravity; diff --git a/src/k_kart.c b/src/k_kart.c index c24bb6ee..9e70a1e9 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -4140,7 +4140,7 @@ static void K_initKartHUD(void) } } -static INT32 K_calcSplitFlags(INT32 snapflags) +INT32 K_calcSplitFlags(INT32 snapflags) { INT32 splitflags = 0; @@ -5053,9 +5053,12 @@ static void K_drawBattleFullscreen(void) { INT32 x = BASEVIDWIDTH/2; INT32 y = -64+(stplyr->kartstuff[k_cardanimation]); // card animation goes from 0 to 164, 164 is the middle of the screen + fixed_t scale = FRACUNIT; if (splitscreen) { + scale /= 2; + if ((splitscreen == 1 && stplyr == &players[secondarydisplayplayer]) || (splitscreen > 1 && (stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer]))) y = 232-(stplyr->kartstuff[k_cardanimation]/2); @@ -5078,45 +5081,53 @@ static void K_drawBattleFullscreen(void) } } - if (stplyr == &players[displayplayer]) - V_DrawFadeScreen(); - if (stplyr->exiting) { + if (stplyr == &players[displayplayer]) + V_DrawFadeScreen(); if (stplyr->kartstuff[k_balloon]) - V_DrawScaledPatch(x, y, 0, kp_battlewin); + V_DrawFixedPatch(x<kartstuff[k_balloon] <= 0 && stplyr->kartstuff[k_comebacktimer] && cv_kartcomeback.value) { INT32 t = stplyr->kartstuff[k_comebacktimer]/TICRATE; - INT32 tx = x; - INT32 ty = (BASEVIDHEIGHT/2) + 66; + INT32 txoff = 0; + INT32 ty = (BASEVIDHEIGHT/2)+66; if (t == 0) - tx -= 8; + txoff = 8; else { while (t) { - tx -= 8; + txoff += 8; t /= 10; } } - if (!stplyr->kartstuff[k_comebackshowninfo] && !splitscreen) - V_DrawScaledPatch(x, y, 0, kp_battleinfo); + if (splitscreen) + { + if (splitscreen > 2) + ty = (BASEVIDHEIGHT/4)+33; + if ((splitscreen == 1 && stplyr == &players[secondarydisplayplayer]) + || stplyr == &players[thirddisplayplayer] || stplyr == &players[fourthdisplayplayer]) + ty += (BASEVIDHEIGHT/2); + } + + if (!stplyr->kartstuff[k_comebackshowninfo]) + V_DrawFixedPatch(x< 1) - ty = (BASEVIDHEIGHT/4)+33; - - if (splitscreen < 2) - V_DrawScaledPatch(x, ty, 0, kp_timeoutsticker); - - V_DrawKartString(tx, ty, 0, va("%d", stplyr->kartstuff[k_comebacktimer]/TICRATE)); + V_DrawString(x-(txoff/2), ty, 0, va("%d", stplyr->kartstuff[k_comebacktimer]/TICRATE)); + else + { + V_DrawFixedPatch(x<kartstuff[k_comebacktimer]/TICRATE)); + } } } diff --git a/src/k_kart.h b/src/k_kart.h index 09ffa626..d174a0af 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -40,6 +40,7 @@ fixed_t K_3dKartMovement(player_t *player, boolean onground, fixed_t forwardmove void K_MoveKartPlayer(player_t *player, boolean onground); void K_CheckBalloons(void); +INT32 K_calcSplitFlags(INT32 snapflags); void K_LoadKartHUDGraphics(void); fixed_t K_FindCheckX(fixed_t px, fixed_t py, angle_t ang, fixed_t mx, fixed_t my); void K_drawKartHUD(void); diff --git a/src/p_inter.c b/src/p_inter.c index ac8e3001..a7347917 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -2009,8 +2009,7 @@ boolean P_CheckRacers(void) if (i == MAXPLAYERS) // finished { - countdown = 0; - countdown2 = 0; + countdown = countdown2 = 0; return true; } diff --git a/src/p_spec.c b/src/p_spec.c index 7db68fa5..bb5a9c52 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -4146,12 +4146,15 @@ DoneSection2: if (player->pflags & PF_NIGHTSMODE) player->drillmeter += 48*20; - if (player->laps >= (UINT8)cv_numlaps.value) - CONS_Printf(M_GetText("%s has finished the race.\n"), player_names[player-players]); - else if (player->laps == (UINT8)(cv_numlaps.value - 1)) - CONS_Printf("%s started the final lap\n", player_names[player-players]); - else - CONS_Printf(M_GetText("%s started lap %u\n"), player_names[player-players], (UINT32)player->laps+1); + if (netgame) + { + if (player->laps >= (UINT8)cv_numlaps.value) + CONS_Printf(M_GetText("%s has finished the race.\n"), player_names[player-players]); + else if (player->laps == (UINT8)(cv_numlaps.value - 1)) + CONS_Printf("%s started the final lap\n", player_names[player-players]); + else + CONS_Printf(M_GetText("%s started lap %u\n"), player_names[player-players], (UINT32)player->laps+1); + } // Reset starposts (checkpoints) info // SRB2kart 200117 diff --git a/src/st_stuff.c b/src/st_stuff.c index 9693b4f7..85b74bd2 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1834,7 +1834,17 @@ static void ST_overlayDrawer(void) { // Countdown timer for Race Mode if (countdown) - V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(176), 0, va("%d", countdown/TICRATE)); + { + INT32 x = BASEVIDWIDTH/2; + INT32 y = BASEVIDHEIGHT-24; + if (splitscreen) + { + y = (BASEVIDHEIGHT/2)-12; + if (splitscreen > 1) + x = BASEVIDWIDTH/4; + } + V_DrawCenteredString(x, y, K_calcSplitFlags(0), va("%d", countdown/TICRATE)); + } K_drawKartHUD();