From 88af2ff3bc67ed9a82f01330de2cb0c252d9ed8e Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 17 Jan 2019 01:28:11 -0500 Subject: [PATCH] Use val instead of pos? Let's see if this fixes it... --- src/g_game.c | 2 +- src/y_inter.c | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 0c9f7c911..b63af6c51 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -64,7 +64,7 @@ JoyType_t Joystick4; #define SAVEGAMESIZE (1024) // SRB2kart -char gamedatafilename[64] = "kartdata.dat"; +char gamedatafilename[64] = "vr.dat"; char timeattackfolder[64] = "kart"; char customversionstring[32] = "\0"; diff --git a/src/y_inter.c b/src/y_inter.c index 53be9893c..b617db274 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -336,22 +336,35 @@ static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32)) for (j = 0; j < numplayersingame; j++) { + boolean won = false; + if (i == j) // Same person continue; - if (data.match.pos[i] == data.match.pos[j]) // Tie -- neither get any points for this match up. + if (data.match.val[i] == data.match.val[j]) // Tie -- neither get any points for this match up. continue; theirpower = 5000; if (clientpowerlevels[j][powertype] != 0) // No power level acts as 5000 (used for splitscreen guests) theirpower = clientpowerlevels[j][powertype]; - if (data.match.pos[i] < data.match.pos[j]) // This player won! + if (G_RaceGametype()) + { + if (data.match.val[i] < data.match.val[j]) + won = true; + } + else + { + if (data.match.val[i] > data.match.val[j]) + won = true; + } + + if (won) // This player won! { diff = theirpower - yourpower; inc += K_CalculatePowerLevelInc(diff); } - else if (data.match.pos[i] > data.match.pos[j]) // This player lost... + else // This player lost... { diff = yourpower - theirpower; inc -= K_CalculatePowerLevelInc(diff);