P_Net(Un)ArchivePlayers: Send roundconditions.unlocktriggers over the wire

Discovered while self-reviewing that ACS has read access to this, not just write, so it has to be saved and loaded.
It is the only roundcondition which should be netsynced. Everything else is truly per-player progression.
This commit is contained in:
toaster 2023-03-14 22:04:38 +00:00
parent 2e1efaff0c
commit edddb26f98

View file

@ -487,6 +487,10 @@ static void P_NetArchivePlayers(savebuffer_t *save)
WRITEFIXED(save->p, players[i].loop.shift.x);
WRITEFIXED(save->p, players[i].loop.shift.y);
WRITEUINT8(save->p, players[i].loop.flip);
// ACS has read access to this, so it has to be net-communicated.
// It is the ONLY roundcondition that is sent over the wire and I'd like it to stay that way.
WRITEUINT32(save->p, players[i].roundconditions.unlocktriggers);
}
}
@ -874,6 +878,10 @@ static void P_NetUnArchivePlayers(savebuffer_t *save)
players[i].loop.shift.y = READFIXED(save->p);
players[i].loop.flip = READUINT8(save->p);
// ACS has read access to this, so it has to be net-communicated.
// It is the ONLY roundcondition that is sent over the wire and I'd like it to stay that way.
players[i].roundconditions.unlocktriggers = READUINT32(save->p);
//players[i].viewheight = P_GetPlayerViewHeight(players[i]); // scale cannot be factored in at this point
}
}