mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: initialize network buffers used on player connect and after
This commit is contained in:
parent
c23396f533
commit
fccf044976
@ -709,6 +709,7 @@ void CL_WritePacket( void )
|
|||||||
|
|
||||||
CL_ComputePacketLoss ();
|
CL_ComputePacketLoss ();
|
||||||
|
|
||||||
|
memset( data, 0, sizeof( data ));
|
||||||
MSG_Init( &buf, "ClientData", data, sizeof( data ));
|
MSG_Init( &buf, "ClientData", data, sizeof( data ));
|
||||||
|
|
||||||
// Determine number of backup commands to send along
|
// Determine number of backup commands to send along
|
||||||
|
@ -1589,6 +1589,7 @@ void Netchan_TransmitBits( netchan_t *chan, int length, byte *data )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset( send_buf, 0, sizeof( send_buf ));
|
||||||
MSG_Init( &send, "NetSend", send_buf, sizeof( send_buf ));
|
MSG_Init( &send, "NetSend", send_buf, sizeof( send_buf ));
|
||||||
|
|
||||||
// prepare the packet header
|
// prepare the packet header
|
||||||
|
@ -1632,6 +1632,7 @@ static qboolean SV_New_f( sv_client_t *cl )
|
|||||||
sizebuf_t msg;
|
sizebuf_t msg;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
memset( msg_buf, 0, sizeof( msg_buf ));
|
||||||
MSG_Init( &msg, "New", msg_buf, sizeof( msg_buf ));
|
MSG_Init( &msg, "New", msg_buf, sizeof( msg_buf ));
|
||||||
|
|
||||||
if( cl->state != cs_connected )
|
if( cl->state != cs_connected )
|
||||||
@ -1982,6 +1983,7 @@ static qboolean SV_SendRes_f( sv_client_t *cl )
|
|||||||
if( cl->state != cs_connected )
|
if( cl->state != cs_connected )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
memset( buffer, 0, sizeof( buffer ));
|
||||||
MSG_Init( &msg, "SendResources", buffer, sizeof( buffer ));
|
MSG_Init( &msg, "SendResources", buffer, sizeof( buffer ));
|
||||||
|
|
||||||
if( svs.maxclients > 1 && FBitSet( cl->flags, FCL_SEND_RESOURCES ))
|
if( svs.maxclients > 1 && FBitSet( cl->flags, FCL_SEND_RESOURCES ))
|
||||||
|
@ -711,6 +711,7 @@ void SV_SendClientDatagram( sv_client_t *cl )
|
|||||||
byte msg_buf[MAX_DATAGRAM];
|
byte msg_buf[MAX_DATAGRAM];
|
||||||
sizebuf_t msg;
|
sizebuf_t msg;
|
||||||
|
|
||||||
|
memset( msg_buf, 0, sizeof( msg_buf ));
|
||||||
MSG_Init( &msg, "Datagram", msg_buf, sizeof( msg_buf ));
|
MSG_Init( &msg, "Datagram", msg_buf, sizeof( msg_buf ));
|
||||||
|
|
||||||
// always send servertime at new frame
|
// always send servertime at new frame
|
||||||
|
Loading…
x
Reference in New Issue
Block a user