mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
Only resend the gamestate to one client at a time
This commit is contained in:
parent
7ae53364f2
commit
499bb56436
1 changed files with 12 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue