diff --git a/src/k_kart.c b/src/k_kart.c index 7e649ac43..47bb1ad05 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -5293,6 +5293,11 @@ void K_KartPlayerHUDUpdate(player_t *player) if (player->karthud[khud_tauntvoices]) player->karthud[khud_tauntvoices]--; + if (!(player->pflags & PF_SKIDDOWN)) + player->karthud[khud_fault] = 0; + else if (player->karthud[khud_fault] > 0 && player->karthud[khud_fault] < 2*TICRATE) + player->karthud[khud_fault]++; + if (G_RaceGametype()) { // 0 is the fast spin animation, set at 30 tics of ring boost or higher! @@ -10737,6 +10742,8 @@ static void K_drawKartStartCountdown(void) if (stplyr->karthud[khud_fault] != 0) { + INT32 x, xval; + if (r_splitscreen > 1) // 3/4p, stationary FIN { pnum += 2; @@ -10749,7 +10756,25 @@ static void K_drawKartStartCountdown(void) if ((leveltime % (2*5)) / 5) // blink pnum += 1; - V_DrawScaledPatch(STCD_X - (SHORT(kp_racefault[pnum]->width)/2), STCD_Y - (SHORT(kp_racefault[pnum]->height)/2), splitflags, kp_racefault[pnum]); + if (r_splitscreen == 0) + { + x = ((vid.width<width)<karthud[khud_fault])*(xval > x ? xval : x))/TICRATE; + + V_DrawFixedPatch(x + (STCD_X<>1), + (STCD_Y<height)<<(FRACBITS-1)), + FRACUNIT, + splitflags, kp_racefault[pnum], NULL); + } + else + { + V_DrawScaledPatch(STCD_X - (SHORT(kp_racefault[pnum]->width)/2), STCD_Y - (SHORT(kp_racefault[pnum]->height)/2), splitflags, kp_racefault[pnum]); + } + } + else if (leveltime >= introtime && leveltime < starttime-(3*TICRATE)) + { + K_drawKartStartBulbs(); } else { @@ -11596,12 +11621,8 @@ void K_drawKartHUD(void) } // Draw the countdowns after everything else. - if (leveltime >= introtime && leveltime < starttime-(3*TICRATE)) - { - K_drawKartStartBulbs(); - } - else if (leveltime >= starttime-(3*TICRATE) - && leveltime < starttime+TICRATE) + if (leveltime >= introtime + && leveltime < starttime+TICRATE) { K_drawKartStartCountdown(); } diff --git a/src/k_respawn.c b/src/k_respawn.c index 360174fa1..28f4b432c 100644 --- a/src/k_respawn.c +++ b/src/k_respawn.c @@ -101,13 +101,12 @@ void K_DoIngameRespawn(player_t *player) return; } - if (leveltime < starttime) + if (leveltime < starttime) // FAULT { player->powers[pw_nocontrol] = (starttime - leveltime) + 50; player->pflags |= PF_SKIDDOWN; // cheeky pflag reuse S_StartSound(player->mo, sfx_s3k83); player->karthud[khud_fault] = 1; - player->mo->momx = player->mo->momy = 0; } player->kartstuff[k_ringboost] = 0; @@ -288,7 +287,7 @@ static void K_MovePlayerToRespawnPoint(player_t *player) player->mo->momx = player->mo->momy = player->mo->momz = 0; player->powers[pw_flashing] = 2; - player->powers[pw_nocontrol] = 2; + player->powers[pw_nocontrol] = max(2, player->powers[pw_nocontrol]); if (leveltime % 8 == 0 && !mapreset) { @@ -541,7 +540,8 @@ static void K_MovePlayerToRespawnPoint(player_t *player) --------------------------------------------------*/ static void K_DropDashWait(player_t *player) { - player->respawn.timer--; + if (player->powers[pw_nocontrol] == 0) + player->respawn.timer--; if (leveltime % 8 == 0) { diff --git a/src/p_spec.c b/src/p_spec.c index 315e04aa5..1e3c30299 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -2066,7 +2066,12 @@ static void K_HandleLapIncrement(player_t *player) { if (player) { - if ((player->starpostnum == numstarposts) || (player->laps == 0)) + if (leveltime < starttime) + { + // Will fault the player + K_DoIngameRespawn(player); + } + else if ((player->starpostnum == numstarposts) || (player->laps == 0)) { size_t i = 0; UINT8 nump = 0; @@ -2101,6 +2106,14 @@ static void K_HandleLapIncrement(player_t *player) player->karthud[khud_lapanimation] = 80; } + if (rainbowstartavailable == true) + { + S_StartSound(player->mo, sfx_s23c); + player->kartstuff[k_startboost] = 125; + K_SpawnDriftBoostExplosion(player, 3); + rainbowstartavailable = false; + } + if (netgame && player->laps >= (UINT8)cv_numlaps.value) CON_LogMessage(va(M_GetText("%s has finished the race.\n"), player_names[player-players])); @@ -2184,23 +2197,6 @@ static void K_HandleLapIncrement(player_t *player) { S_StartSound(player->mo, sfx_s26d); } - - if (leveltime < starttime) - { - // LATER: replace with the rotatey knockback whenever we get around to it - player->powers[pw_nocontrol] = (starttime - leveltime) + 50; - player->pflags |= PF_SKIDDOWN; // cheeky pflag reuse - S_StartSound(player->mo, sfx_s3k83); - player->karthud[khud_fault] = 1; - player->mo->momx = player->mo->momy = 0; - } - else if (rainbowstartavailable == true) - { - S_StartSound(player->mo, sfx_s23c); - player->kartstuff[k_startboost] = 125; - K_SpawnDriftBoostExplosion(player, 3); - rainbowstartavailable = false; - } } }