mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'lap-anim-annoying' into 'master'
Lap animation polish See merge request KartKrew/Kart!1651
This commit is contained in:
commit
af6b4c503a
2 changed files with 24 additions and 24 deletions
|
|
@ -5027,7 +5027,7 @@ static void K_drawLapStartAnim(void)
|
||||||
kp_lapanim_hand[stplyr->karthud[khud_laphand]-1], NULL);
|
kp_lapanim_hand[stplyr->karthud[khud_laphand]-1], NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stplyr->laps == (UINT8)(numlaps))
|
if (stplyr->latestlap == (UINT8)(numlaps))
|
||||||
{
|
{
|
||||||
newval = (62 - (32 * max(0, progress - 76))) * FRACUNIT;
|
newval = (62 - (32 * max(0, progress - 76))) * FRACUNIT;
|
||||||
oldval = (62 - (32 * max(0, progressOld - 76))) * FRACUNIT;
|
oldval = (62 - (32 * max(0, progressOld - 76))) * FRACUNIT;
|
||||||
|
|
@ -5074,7 +5074,7 @@ static void K_drawLapStartAnim(void)
|
||||||
interpx, // 194
|
interpx, // 194
|
||||||
30*FRACUNIT, // 24
|
30*FRACUNIT, // 24
|
||||||
FRACUNIT, V_SNAPTOTOP|V_HUDTRANS,
|
FRACUNIT, V_SNAPTOTOP|V_HUDTRANS,
|
||||||
kp_lapanim_number[(((UINT32)stplyr->laps) / 10)][min(progress/2-8, 2)], NULL);
|
kp_lapanim_number[(((UINT32)stplyr->latestlap) / 10)][min(progress/2-8, 2)], NULL);
|
||||||
|
|
||||||
if (progress/2-10 >= 0)
|
if (progress/2-10 >= 0)
|
||||||
{
|
{
|
||||||
|
|
@ -5086,7 +5086,7 @@ static void K_drawLapStartAnim(void)
|
||||||
interpx, // 221
|
interpx, // 221
|
||||||
30*FRACUNIT, // 24
|
30*FRACUNIT, // 24
|
||||||
FRACUNIT, V_SNAPTOTOP|V_HUDTRANS,
|
FRACUNIT, V_SNAPTOTOP|V_HUDTRANS,
|
||||||
kp_lapanim_number[(((UINT32)stplyr->laps) % 10)][min(progress/2-10, 2)], NULL);
|
kp_lapanim_number[(((UINT32)stplyr->latestlap) % 10)][min(progress/2-10, 2)], NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
42
src/p_spec.c
42
src/p_spec.c
|
|
@ -1944,27 +1944,6 @@ static void K_HandleLapIncrement(player_t *player)
|
||||||
|
|
||||||
player->laps++;
|
player->laps++;
|
||||||
|
|
||||||
// Set up lap animation vars
|
|
||||||
if (player->laps > 1)
|
|
||||||
{
|
|
||||||
if (nump > 1)
|
|
||||||
{
|
|
||||||
if (K_IsPlayerLosing(player))
|
|
||||||
player->karthud[khud_laphand] = 3;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (nump > 2 && player->position == 1) // 1st place in 1v1 uses thumbs up
|
|
||||||
player->karthud[khud_laphand] = 1;
|
|
||||||
else
|
|
||||||
player->karthud[khud_laphand] = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
player->karthud[khud_laphand] = 0; // No hands in FREE PLAY
|
|
||||||
|
|
||||||
player->karthud[khud_lapanimation] = 80;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (G_TimeAttackStart() && !linecrossed)
|
if (G_TimeAttackStart() && !linecrossed)
|
||||||
{
|
{
|
||||||
linecrossed = leveltime;
|
linecrossed = leveltime;
|
||||||
|
|
@ -2059,6 +2038,27 @@ static void K_HandleLapIncrement(player_t *player)
|
||||||
}
|
}
|
||||||
|
|
||||||
player->latestlap = player->laps;
|
player->latestlap = player->laps;
|
||||||
|
|
||||||
|
// Set up lap animation vars
|
||||||
|
if (player->latestlap > 1)
|
||||||
|
{
|
||||||
|
if (nump > 1)
|
||||||
|
{
|
||||||
|
if (K_IsPlayerLosing(player))
|
||||||
|
player->karthud[khud_laphand] = 3;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (nump > 2 && player->position == 1) // 1st place in 1v1 uses thumbs up
|
||||||
|
player->karthud[khud_laphand] = 1;
|
||||||
|
else
|
||||||
|
player->karthud[khud_laphand] = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
player->karthud[khud_laphand] = 0; // No hands in FREE PLAY
|
||||||
|
|
||||||
|
player->karthud[khud_lapanimation] = 80;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// finished race exit setup
|
// finished race exit setup
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue