Clean up some buffers that were never used.
This commit is contained in:
parent
10402a5f1c
commit
f4330d765d
4 changed files with 4 additions and 41 deletions
|
@ -207,12 +207,6 @@ typedef struct server_s
|
|||
#endif
|
||||
|
||||
#ifdef Q2SERVER
|
||||
sizebuf_t q2datagram;
|
||||
qbyte q2datagram_buf[MAX_Q2DATAGRAM];
|
||||
|
||||
sizebuf_t q2reliable_datagram;
|
||||
qbyte q2reliable_datagram_buf[MAX_Q2MSGLEN];
|
||||
|
||||
sizebuf_t q2multicast;
|
||||
qbyte q2multicast_buf[MAX_Q2MSGLEN];
|
||||
#endif
|
||||
|
|
|
@ -2126,7 +2126,7 @@ static void SV_StuffToClient_f(void)
|
|||
|
||||
while((cl = SV_GetClientForString(clientname, &clnum)))
|
||||
{
|
||||
if (cl->protocol == SCP_QUAKE2)
|
||||
if (ISQ2CLIENT(cl))
|
||||
ClientReliableWrite_Begin (cl, svcq2_stufftext, 3+strlen(str) + (key?strlen(key)+6:0));
|
||||
else
|
||||
ClientReliableWrite_Begin (cl, svc_stufftext, 3+strlen(str) + (key?strlen(key)+6:0));
|
||||
|
|
|
@ -789,15 +789,6 @@ void SV_SetupNetworkBuffers(qboolean bigcoords)
|
|||
#endif
|
||||
|
||||
#ifdef Q2SERVER
|
||||
sv.q2datagram.maxsize = sizeof(sv.q2datagram_buf);
|
||||
sv.q2datagram.data = sv.q2datagram_buf;
|
||||
sv.q2datagram.allowoverflow = true;
|
||||
sv.q2datagram.prim = svs.netprim;
|
||||
|
||||
sv.q2reliable_datagram.maxsize = sizeof(sv.q2reliable_datagram_buf);
|
||||
sv.q2reliable_datagram.data = sv.q2reliable_datagram_buf;
|
||||
sv.q2reliable_datagram.prim = svs.netprim;
|
||||
|
||||
sv.q2multicast.maxsize = sizeof(sv.q2multicast_buf);
|
||||
sv.q2multicast.data = sv.q2multicast_buf;
|
||||
sv.q2multicast.prim = svs.netprim;
|
||||
|
|
|
@ -1516,7 +1516,7 @@ void SV_SendFixAngle(client_t *client, sizebuf_t *msg, int fixtype, qboolean rol
|
|||
client_t *controller = client->controller?client->controller:client;
|
||||
edict_t *ent = client->edict;
|
||||
pvec_t *ang;
|
||||
if (!ent || client->protocol == SCP_QUAKE2)
|
||||
if (!ent || ISQ2CLIENT(client))
|
||||
return;
|
||||
ang = ent->v->fixangle?ent->v->angles:ent->v->v_angle; //angles is just WEIRD for mdls, but then quake sucks.
|
||||
if (ent->v->movetype == MOVETYPE_6DOF)
|
||||
|
@ -2792,22 +2792,8 @@ void SV_FlushBroadcasts (void)
|
|||
if (client->protocol == SCP_BAD)
|
||||
continue; //botclient
|
||||
|
||||
#ifdef Q2SERVER
|
||||
if (ISQ2CLIENT(client))
|
||||
{
|
||||
ClientReliableCheckBlock(client, sv.q2reliable_datagram.cursize);
|
||||
ClientReliableWrite_SZ(client, sv.q2reliable_datagram.data, sv.q2reliable_datagram.cursize);
|
||||
|
||||
if (client->state != cs_spawned)
|
||||
continue; // datagrams only go to spawned
|
||||
SZ_Write (&client->datagram
|
||||
, sv.q2datagram.data
|
||||
, sv.q2datagram.cursize);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef NQPROT
|
||||
if (!ISQWCLIENT(client))
|
||||
if (ISNQCLIENT(client))
|
||||
{
|
||||
if (client->pextknown)
|
||||
{
|
||||
|
@ -2845,10 +2831,6 @@ void SV_FlushBroadcasts (void)
|
|||
SZ_Clear (&sv.nqreliable_datagram);
|
||||
SZ_Clear (&sv.nqdatagram);
|
||||
#endif
|
||||
#ifdef Q2SERVER
|
||||
SZ_Clear (&sv.q2reliable_datagram);
|
||||
SZ_Clear (&sv.q2datagram);
|
||||
#endif
|
||||
}
|
||||
|
||||
static qboolean SV_SyncInfoBuf(client_t *client)
|
||||
|
@ -2866,7 +2848,7 @@ static qboolean SV_SyncInfoBuf(client_t *client)
|
|||
qboolean final;
|
||||
sizebuf_t *buf;
|
||||
|
||||
if (client->protocol == SCP_QUAKE2)
|
||||
if (ISQ2CLIENT(client))
|
||||
{ //q2 gamecode is fully responsible for networking this via configstrings.
|
||||
InfoSync_Clear(&client->infosync);
|
||||
return false;
|
||||
|
@ -3272,10 +3254,6 @@ void SV_UpdateToReliableMessages (void)
|
|||
if (sv.nqdatagram.overflowed)
|
||||
SZ_Clear (&sv.nqdatagram);
|
||||
#endif
|
||||
#ifdef Q2SERVER
|
||||
if (sv.q2datagram.overflowed)
|
||||
SZ_Clear (&sv.q2datagram);
|
||||
#endif
|
||||
|
||||
SV_FlushBroadcasts();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue