From edddb26f9821f351731f7a8c97b030db16f96528 Mon Sep 17 00:00:00 2001 From: toaster Date: Tue, 14 Mar 2023 22:04:38 +0000 Subject: [PATCH] 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. --- src/p_saveg.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/p_saveg.c b/src/p_saveg.c index 544c43624..f28efeb15 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -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 } }