Give gamestate resend integrity check some teeth

This commit is contained in:
AJ Martinez 2023-03-21 23:34:56 -07:00 committed by James R
parent 137f166043
commit f9832eb77f

View file

@ -1388,17 +1388,19 @@ static void CL_LoadReceivedSavegame(boolean reloading)
netbuffer->packettype = PT_RECEIVEDGAMESTATE;
HSendPacket(servernode, true, 0, 0);
if (reloading)
{
int i;
for (i = 0; i < MAXPLAYERS; i++)
{
if (memcmp(priorGamestateKeySave[i], players[i].public_key, sizeof(priorGamestateKeySave[i])) != 0)
{
CONS_Printf("New gamestate has different public keys, shenanigans afoot?\n");
// TODO: Actually do something in this situation
HandleSigfail("Gamestate reload contained new keys");
break;
}
}
}
}
static void CL_ReloadReceivedSavegame(void)
{