From 63f87b4cecba5d2854497c32fae11f737c14b370 Mon Sep 17 00:00:00 2001 From: JugadorXEI Date: Sun, 30 May 2021 18:45:38 +0200 Subject: [PATCH] Use toaster's approach to fix 0th position --- src/g_game.c | 4 ---- src/k_kart.c | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index c6c6d63f..4eb195e9 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2598,7 +2598,6 @@ void G_PlayerReborn(INT32 player) SINT8 pity; // SRB2kart - INT32 position; INT32 starpostwp; INT32 itemtype; INT32 itemamount; @@ -2661,12 +2660,10 @@ void G_PlayerReborn(INT32 player) bumper = (G_BattleGametype() ? cv_kartbumpers.value : 0); comebackpoints = 0; wanted = 0; - position = 0; starpostwp = 0; } else { - position = players[player].kartstuff[k_position]; starpostwp = players[player].kartstuff[k_starpostwp]; itemroulette = (players[player].kartstuff[k_itemroulette] > 0 ? 1 : 0); @@ -2734,7 +2731,6 @@ void G_PlayerReborn(INT32 player) p->pity = pity; // SRB2kart - p->kartstuff[k_position] = position; p->kartstuff[k_starpostwp] = starpostwp; // TODO: get these out of kartstuff, it causes desync p->kartstuff[k_itemroulette] = itemroulette; p->kartstuff[k_roulettetype] = roulettetype; diff --git a/src/k_kart.c b/src/k_kart.c index a47c3b52..6b7a7a0e 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -952,6 +952,7 @@ static INT32 K_FindUseodds(player_t *player, fixed_t mashed, INT32 pingame, INT3 for (i = 0; i < MAXPLAYERS; i++) { if (playeringame[i] && !players[i].spectator && players[i].mo + && players[i].kartstuff[k_position] != 0 && players[i].kartstuff[k_position] < player->kartstuff[k_position]) pdis += P_AproxDistance(P_AproxDistance(players[i].mo->x - player->mo->x, players[i].mo->y - player->mo->y),