mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
avoid wasteful player_t copy
This commit is contained in:
parent
3e6d1d4c60
commit
d71fdc9d0a
1 changed files with 4 additions and 4 deletions
|
|
@ -57,17 +57,17 @@ static void K_UpdateDirectorPositions(void)
|
|||
{
|
||||
INT32 playernum;
|
||||
INT32 position;
|
||||
player_t target;
|
||||
player_t* target;
|
||||
|
||||
memset(directorinfo.sortedplayers, -1, sizeof(directorinfo.sortedplayers));
|
||||
|
||||
for (playernum = 0; playernum < MAXPLAYERS; playernum++)
|
||||
{
|
||||
target = players[playernum];
|
||||
target = &players[playernum];
|
||||
|
||||
if (playeringame[playernum] && !target.spectator && target.position > 0)
|
||||
if (playeringame[playernum] && !target->spectator && target->position > 0)
|
||||
{
|
||||
directorinfo.sortedplayers[target.position - 1] = playernum;
|
||||
directorinfo.sortedplayers[target->position - 1] = playernum;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue