mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
Get distance to first by using the distanceofinish variable for roulette
This commit is contained in:
parent
6bcc283d3b
commit
991cef9163
1 changed files with 6 additions and 7 deletions
13
src/k_kart.c
13
src/k_kart.c
|
|
@ -1088,13 +1088,12 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
|
||||||
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
if (playeringame[i] && !players[i].spectator && players[i].mo
|
if (players[i].kartstuff[k_position] == 1)
|
||||||
&& players[i].kartstuff[k_position] < player->kartstuff[k_position])
|
{
|
||||||
pdis += P_AproxDistance(P_AproxDistance(players[i].mo->x - player->mo->x,
|
// This player is first! Yay!
|
||||||
players[i].mo->y - player->mo->y),
|
pdis = player->distancetofinish - players[i].distancetofinish;
|
||||||
players[i].mo->z - player->mo->z) / mapobjectscale
|
break;
|
||||||
* (pingame - players[i].kartstuff[k_position])
|
}
|
||||||
/ max(1, ((pingame - 1) * (pingame + 1) / 3));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (franticitems) // Frantic items make the distances between everyone artifically higher, for crazier items
|
if (franticitems) // Frantic items make the distances between everyone artifically higher, for crazier items
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue