mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Combine loops
This commit is contained in:
parent
2a30fc365f
commit
dc1ae10cd8
1 changed files with 2 additions and 15 deletions
|
|
@ -516,20 +516,7 @@ void K_FakeBotResults(player_t *bot)
|
|||
{
|
||||
besttime = players[i].realtime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (besttime == UINT32_MAX)
|
||||
{
|
||||
// No one finished, so you don't finish either.
|
||||
bot->pflags |= PF_TIMEOVER;
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (playeringame[i] && !players[i].spectator)
|
||||
{
|
||||
if (players[i].distancetofinish > worstdist)
|
||||
{
|
||||
worstdist = players[i].distancetofinish;
|
||||
|
|
@ -537,9 +524,9 @@ void K_FakeBotResults(player_t *bot)
|
|||
}
|
||||
}
|
||||
|
||||
if (bot->distancetofinish >= worstdist)
|
||||
if (besttime == UINT32_MAX // No one finished, so you don't finish either.
|
||||
|| bot->distancetofinish >= worstdist) // Last place, you aren't going to finish.
|
||||
{
|
||||
// Last place, you aren't going to finish.
|
||||
bot->pflags |= PF_TIMEOVER;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue