- changed most places where a player index is calculated by subtracting the player array's base access.
This commit is contained in:
parent
d358e401ee
commit
202f3d7d80
10 changed files with 27 additions and 25 deletions
|
|
@ -588,13 +588,13 @@ void P_SerializePlayers(FLevelLocals *Level, FSerializer &arc, bool skipload)
|
|||
// Record each player's name, followed by their data.
|
||||
for (i = 0; i < MAXPLAYERS; ++i)
|
||||
{
|
||||
if (playeringame[i])
|
||||
if (Level->PlayerInGame(i))
|
||||
{
|
||||
if (arc.BeginObject(nullptr))
|
||||
{
|
||||
const char *n = players[i].userinfo.GetName();
|
||||
const char *n = Level->Players[i]->userinfo.GetName();
|
||||
arc.StringPtr("playername", n);
|
||||
players[i].Serialize(arc);
|
||||
Level->Players[i]->Serialize(arc);
|
||||
arc.EndObject();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue