Skip to content
Snippets Groups Projects
Commit 499bb564 authored by LJ Sonic's avatar LJ Sonic
Browse files

Only resend the gamestate to one client at a time

parent 7ae53364
No related branches found
No related tags found
No related merge requests found
......@@ -1391,6 +1391,16 @@ static boolean SV_SendServerConfig(INT32 node)
#ifndef NONET
#define SAVEGAMESIZE (768*1024)
static boolean SV_ResendingSavegameToAnyone(void)
{
INT32 i;
for (i = 0; i < MAXNETNODES; i++)
if (resendingsavegame[i])
return true;
return false;
}
static void SV_SendSaveGame(INT32 node, boolean resending)
{
size_t length, compressedlen;
......@@ -4074,7 +4084,8 @@ static void HandlePacketFromPlayer(SINT8 node)
// Check player consistancy during the level
if (realstart <= gametic && realstart + BACKUPTICS - 1 > gametic && gamestate == GS_LEVEL
&& consistancy[realstart%BACKUPTICS] != SHORT(netbuffer->u.clientpak.consistancy)
&& !resendingsavegame[node] && savegameresendcooldown[node] <= I_GetTime())
&& !resendingsavegame[node] && savegameresendcooldown[node] <= I_GetTime()
&& !SV_ResendingSavegameToAnyone())
{
if (cv_resynchattempts.value)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment