Do lapping how it was in v1. zero = one rather then one = one
this mostly works but now maps using nothing but waypoints allow you to gain a free lap on racestart. This seems like i would need some sort of lap validation for the new waypoint system.
This commit is contained in:
parent
e03277d272
commit
7941448e59
4 changed files with 9 additions and 12 deletions
12
src/k_hud.c
12
src/k_hud.c
|
|
@ -2214,7 +2214,7 @@ void K_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, IN
|
||||||
else if (players[tab[i].num].pflags & PF_NOCONTEST)
|
else if (players[tab[i].num].pflags & PF_NOCONTEST)
|
||||||
V_DrawRightAlignedThinString(x+rightoffset, y-1, V_6WIDTHSPACE, "NO CONTEST.");
|
V_DrawRightAlignedThinString(x+rightoffset, y-1, V_6WIDTHSPACE, "NO CONTEST.");
|
||||||
else if (circuitmap)
|
else if (circuitmap)
|
||||||
V_DrawRightAlignedThinString(x+rightoffset, y-1, V_6WIDTHSPACE, va("Lap %d", tab[i].count));
|
V_DrawRightAlignedThinString(x+rightoffset, y-1, V_6WIDTHSPACE, va("Lap %d", tab[i].count+1));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -2223,7 +2223,7 @@ void K_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, IN
|
||||||
else if (players[tab[i].num].pflags & PF_NOCONTEST)
|
else if (players[tab[i].num].pflags & PF_NOCONTEST)
|
||||||
V_DrawRightAlignedThinString(x+rightoffset, y-1, 0, "NO CONTEST.");
|
V_DrawRightAlignedThinString(x+rightoffset, y-1, 0, "NO CONTEST.");
|
||||||
else if (circuitmap)
|
else if (circuitmap)
|
||||||
V_DrawRightAlignedString(x+rightoffset, y, 0, va("Lap %d", tab[i].count));
|
V_DrawRightAlignedString(x+rightoffset, y, 0, va("Lap %d", tab[i].count+1));
|
||||||
}
|
}
|
||||||
#undef timestring
|
#undef timestring
|
||||||
}
|
}
|
||||||
|
|
@ -2371,7 +2371,7 @@ static void K_drawKartLapsAndRings(void)
|
||||||
{
|
{
|
||||||
// Laps
|
// Laps
|
||||||
V_DrawScaledPatch(LAPS_X, LAPS_Y, V_HUDTRANS|splitflags, kp_lapsticker);
|
V_DrawScaledPatch(LAPS_X, LAPS_Y, V_HUDTRANS|splitflags, kp_lapsticker);
|
||||||
V_DrawKartString(LAPS_X+33, LAPS_Y+3, V_HUDTRANS|splitflags, va("%d/%d", min(stplyr->laps, numlaps), numlaps));
|
V_DrawKartString(LAPS_X+33, LAPS_Y+3, V_HUDTRANS|splitflags, va("%d/%d", min(stplyr->laps+1, numlaps), numlaps));
|
||||||
|
|
||||||
if (!ringsdisabled)
|
if (!ringsdisabled)
|
||||||
{
|
{
|
||||||
|
|
@ -4198,7 +4198,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->laps == (UINT8)(numlaps-1))
|
||||||
{
|
{
|
||||||
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;
|
||||||
|
|
@ -4245,7 +4245,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->laps+1) / 10)][min(progress/2-8, 2)], NULL);
|
||||||
|
|
||||||
if (progress/2-10 >= 0)
|
if (progress/2-10 >= 0)
|
||||||
{
|
{
|
||||||
|
|
@ -4257,7 +4257,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->laps+1) % 10)][min(progress/2-10, 2)], NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6730,10 +6730,6 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
}
|
}
|
||||||
player->superring--;
|
player->superring--;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start at lap 1 when using old checkpoint system just to be safe.
|
|
||||||
if ((numbosswaypoints > 0) && (player->laps == 0) && (numlaps > 0))
|
|
||||||
player->laps = 1;
|
|
||||||
|
|
||||||
if (player->stealingtimer == 0 && player->stolentimer == 0
|
if (player->stealingtimer == 0 && player->stolentimer == 0
|
||||||
&& player->rocketsneakertimer)
|
&& player->rocketsneakertimer)
|
||||||
|
|
|
||||||
|
|
@ -43,12 +43,13 @@ static const char *const hud_disable_options[] = {
|
||||||
"stagetitle",
|
"stagetitle",
|
||||||
"textspectator",
|
"textspectator",
|
||||||
"crosshair",
|
"crosshair",
|
||||||
|
"scores",
|
||||||
"time",
|
"time",
|
||||||
"gametypeinfo", // Bumpers / Karma / Laps depending on gametype
|
"gametypeinfo", // Bumpers / Karma / Laps depending on gametype
|
||||||
"minimap",
|
"minimap",
|
||||||
"item",
|
"item",
|
||||||
"position",
|
"position",
|
||||||
|
"nametags",
|
||||||
"check", // "CHECK" f-zero indicator
|
"check", // "CHECK" f-zero indicator
|
||||||
"minirankings", // Gametype rankings to the left
|
"minirankings", // Gametype rankings to the left
|
||||||
"battlerankingsbumpers", // bumper drawer for battle. Useful if you want to make a custom battle gamemode without bumpers being involved.
|
"battlerankingsbumpers", // bumper drawer for battle. Useful if you want to make a custom battle gamemode without bumpers being involved.
|
||||||
|
|
|
||||||
|
|
@ -1889,7 +1889,7 @@ static void K_HandleLapIncrement(player_t *player)
|
||||||
{
|
{
|
||||||
if (player)
|
if (player)
|
||||||
{
|
{
|
||||||
if (((numbosswaypoints > 0) ? (player->starpostnum >= (numstarposts - (numstarposts/2))) : (player->starpostnum == numstarposts)) || (player->laps == 0))
|
if (((numbosswaypoints > 0) ? (player->starpostnum >= (numstarposts - (numstarposts/2))) : (player->starpostnum == numstarposts)))
|
||||||
{
|
{
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
UINT8 nump = 0;
|
UINT8 nump = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue