Actually uncap battle animations
...am I really using "uncap" and "interpolate" correctly?
This commit is contained in:
1 parent
883522c17b
commit
4ed335422c
4 files changed
+12
-8
No files matched your search
@@ -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
|
||||
|
||||
@@ -7713,7 +7713,6 @@ static const char *const KARTSTUFF_LIST[] = {
|
||||
"LAPANIMATION",
|
||||
"LAPHAND",
|
||||
"CARDANIMATION",
|
||||
"OLDCARDANIMATION",
|
||||
"VOICES",
|
||||
"TAUNTVOICES",
|
||||
"INSTASHIELD",
|
||||
|
||||
+11
-5
@@ -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]<<FRACBITS, stplyr->kartstuff[k_cardanimation]<<FRACBITS);
|
||||
#undef lerp
|
||||
INT32 cardanim = stplyr->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
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user