mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Y_CalculateMatchData: only overwrite demo extrainfo section if there is standings data to save
This commit is contained in:
parent
35d9079140
commit
ecae138f0e
1 changed files with 3 additions and 2 deletions
|
|
@ -196,6 +196,7 @@ static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32))
|
||||||
data.isduel = (numplayersingame <= 2);
|
data.isduel = (numplayersingame <= 2);
|
||||||
|
|
||||||
srb2::StandingsJson standings {};
|
srb2::StandingsJson standings {};
|
||||||
|
bool savestandings = (!rankingsmode && demo.recording);
|
||||||
|
|
||||||
for (j = 0; j < numplayersingame; j++)
|
for (j = 0; j < numplayersingame; j++)
|
||||||
{
|
{
|
||||||
|
|
@ -239,7 +240,7 @@ static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32))
|
||||||
players[i].score += data.increase[i];
|
players[i].score += data.increase[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (demo.recording)
|
if (savestandings)
|
||||||
{
|
{
|
||||||
srb2::StandingJson standing {};
|
srb2::StandingJson standing {};
|
||||||
standing.ranking = data.pos[data.numplayers];
|
standing.ranking = data.pos[data.numplayers];
|
||||||
|
|
@ -285,7 +286,7 @@ static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32))
|
||||||
data.numplayers++;
|
data.numplayers++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (demo.recording)
|
if (savestandings)
|
||||||
{
|
{
|
||||||
srb2::write_current_demo_end_marker();
|
srb2::write_current_demo_end_marker();
|
||||||
srb2::write_current_demo_standings(standings);
|
srb2::write_current_demo_standings(standings);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue