@@ -68,8 +68,7 @@ SV_EmitPacketEntities
6868Writes a delta update of an entityState_t list to the message.
6969=============
7070*/
71- static void SV_EmitPacketEntities ( const clientSnapshot_t *from, clientSnapshot_t *to, msg_t *msg,
72- client_t * client, int lastframe, int snapFlags )
71+ static void SV_EmitPacketEntities ( const clientSnapshot_t *from, clientSnapshot_t *to, msg_t *msg )
7372{
7473 entityState_t *oldent, *newent;
7574 int oldindex, newindex;
@@ -98,42 +97,6 @@ static void SV_EmitPacketEntities( const clientSnapshot_t *from, clientSnapshot_
9897
9998 while ( newindex < to->num_entities || oldindex < from_num_entities )
10099 {
101-
102- if ( MAX_MSGLEN - msg->cursize < 128 ) {
103- MSG_WriteBits ( msg, 0 , GENTITYNUM_BITS );
104- MSG_WriteBits ( msg, 1 , 1 );
105- MSG_WriteBits ( msg, 1 , 1 );
106-
107- SV_SendMessageToClient ( msg, client );
108-
109- MSG_Init ( msg, msg->data , msg->maxsize );
110- MSG_WriteByte ( msg, svc_snapshot );
111-
112- MSG_WriteLong ( msg, sv.time );
113-
114- // what we are delta'ing from
115- MSG_WriteByte ( msg, lastframe );
116-
117- snapFlags = svs.snapFlagServerBit ;
118-
119- MSG_WriteByte ( msg, snapFlags );
120-
121- // send over the areabits
122- MSG_WriteByte ( msg, to->areabytes );
123- MSG_WriteData ( msg, to->areabits , to->areabytes );
124-
125- {
126- // delta encode the playerstate
127- if ( from ) {
128- MSG_WriteDeltaPlayerstate ( msg, &from->ps , &to->ps );
129- } else {
130- MSG_WriteDeltaPlayerstate ( msg, nullptr , &to->ps );
131- }
132- }
133-
134- MSG_WriteShort ( msg, to->num_entities - newindex );
135- }
136-
137100 if ( newindex >= to->num_entities )
138101 {
139102 newnum = MAX_GENTITIES;
@@ -273,7 +236,7 @@ static void SV_WriteSnapshotToClient( client_t *client, msg_t *msg )
273236 }
274237
275238 // delta encode the entities
276- SV_EmitPacketEntities ( oldframe, frame, msg, client, lastframe, snapFlags );
239+ SV_EmitPacketEntities ( oldframe, frame, msg );
277240
278241 // padding for rate debugging
279242 if ( sv_padPackets.Get () )
@@ -302,14 +265,6 @@ void SV_UpdateServerCommandsToClient( client_t *client, msg_t *msg )
302265 MSG_WriteByte ( msg, svc_serverCommand );
303266 MSG_WriteLong ( msg, i );
304267 MSG_WriteString ( msg, client->reliableCommands [ i & ( MAX_RELIABLE_COMMANDS - 1 ) ] );
305-
306- if ( MAX_MSGLEN - msg->cursize < 128 ) {
307- MSG_WriteByte ( msg, svc_partial );
308- SV_SendMessageToClient ( msg, client );
309-
310- MSG_Init ( msg, msg->data , msg->maxsize );
311- MSG_WriteLong ( msg, client->lastClientCommand );
312- }
313268 }
314269
315270 client->reliableSent = client->reliableSequence ;
0 commit comments