diff --git a/src/d_player.h b/src/d_player.h index 862298beb..4d61474fb 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -250,7 +250,6 @@ typedef enum k_lapanimation, // Used to show the lap start wing logo animation k_laphand, // Lap hand gfx to use; 0 = none, 1 = :ok_hand:, 2 = :thumbs_up:, 3 = :thumps_down: k_cardanimation, // Used to determine the position of some full-screen Battle Mode graphics - k_oldcardanimation, // Used to interpolate full-screen Battle Mode graphics k_voices, // Used to stop the player saying more voices than it should k_tauntvoices, // Used to specifically stop taunt voice spam k_instashield, // Instashield no-damage animation timer diff --git a/src/dehacked.c b/src/dehacked.c index 7b1fba740..c42b191a4 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -7713,7 +7713,6 @@ static const char *const KARTSTUFF_LIST[] = { "LAPANIMATION", "LAPHAND", "CARDANIMATION", - "OLDCARDANIMATION", "VOICES", "TAUNTVOICES", "INSTASHIELD", diff --git a/src/k_kart.c b/src/k_kart.c index 83c441395..320c56227 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -4969,8 +4969,6 @@ void K_KartPlayerHUDUpdate(player_t *player) if (G_BattleGametype() && (player->exiting || player->kartstuff[k_comebacktimer])) { - player->kartstuff[k_oldcardanimation] = player->kartstuff[k_cardanimation]; - if (player->exiting) { if (player->exiting < 6*TICRATE) @@ -9870,9 +9868,17 @@ static void K_drawKartFinish(void) static void K_drawBattleFullscreen(void) { - #define lerp(from, to) (from) + FixedMul(rendertimefrac, (to) - (from)) - INT32 cardanim = lerp(stplyr->kartstuff[k_oldcardanimation]<kartstuff[k_cardanimation]<kartstuff[k_cardanimation] << FRACBITS; + + // fill in the fractional bits + if (cardanim && cardanim != 164*FRACUNIT) + { + INT32 frac = (rendertimefrac & FRACMASK) * ((164 - stplyr->kartstuff[k_cardanimation])/8 + 1); + if (stplyr->exiting) + cardanim += frac; + else + cardanim += stplyr->kartstuff[k_comebacktimer] < 6*TICRATE ? -frac : frac; + } INT32 x = BASEVIDWIDTH/2; INT32 y = (-64*FRACUNIT) + cardanim; // card animation goes from 0 to 164, 164 is the middle of the screen diff --git a/src/p_user.c b/src/p_user.c index 0de0f4244..edf585626 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1322,7 +1322,7 @@ void P_DoPlayerExit(player_t *player) player->powers[pw_underwater] = 0; player->powers[pw_spacetime] = 0; - player->kartstuff[k_cardanimation] = player->kartstuff[k_oldcardanimation] = 0; // srb2kart: reset battle animation + player->kartstuff[k_cardanimation] = 0; // srb2kart: reset battle animation if (player == &players[consoleplayer]) demo.savebutton = leveltime;