Use val instead of pos?

Let's see if this fixes it...
This commit is contained in:
TehRealSalt 2019-01-17 01:28:11 -05:00
parent 63861540cb
commit 88af2ff3bc
2 changed files with 17 additions and 4 deletions

View file

@ -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";

View file

@ -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);