mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-15 00:42:06 +00:00
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
|
#endif
|
||||||
|
|
||||||
#ifdef Q2SERVER
|
#ifdef Q2SERVER
|
||||||
sizebuf_t q2datagram;
|
|
||||||
qbyte q2datagram_buf[MAX_Q2DATAGRAM];
|
|
||||||
|
|
||||||
sizebuf_t q2reliable_datagram;
|
|
||||||
qbyte q2reliable_datagram_buf[MAX_Q2MSGLEN];
|
|
||||||
|
|
||||||
sizebuf_t q2multicast;
|
sizebuf_t q2multicast;
|
||||||
qbyte q2multicast_buf[MAX_Q2MSGLEN];
|
qbyte q2multicast_buf[MAX_Q2MSGLEN];
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2126,7 +2126,7 @@ static void SV_StuffToClient_f(void)
|
||||||
|
|
||||||
while((cl = SV_GetClientForString(clientname, &clnum)))
|
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));
|
ClientReliableWrite_Begin (cl, svcq2_stufftext, 3+strlen(str) + (key?strlen(key)+6:0));
|
||||||
else
|
else
|
||||||
ClientReliableWrite_Begin (cl, svc_stufftext, 3+strlen(str) + (key?strlen(key)+6:0));
|
ClientReliableWrite_Begin (cl, svc_stufftext, 3+strlen(str) + (key?strlen(key)+6:0));
|
||||||
|
|
|
@ -789,15 +789,6 @@ void SV_SetupNetworkBuffers(qboolean bigcoords)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q2SERVER
|
#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.maxsize = sizeof(sv.q2multicast_buf);
|
||||||
sv.q2multicast.data = sv.q2multicast_buf;
|
sv.q2multicast.data = sv.q2multicast_buf;
|
||||||
sv.q2multicast.prim = svs.netprim;
|
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;
|
client_t *controller = client->controller?client->controller:client;
|
||||||
edict_t *ent = client->edict;
|
edict_t *ent = client->edict;
|
||||||
pvec_t *ang;
|
pvec_t *ang;
|
||||||
if (!ent || client->protocol == SCP_QUAKE2)
|
if (!ent || ISQ2CLIENT(client))
|
||||||
return;
|
return;
|
||||||
ang = ent->v->fixangle?ent->v->angles:ent->v->v_angle; //angles is just WEIRD for mdls, but then quake sucks.
|
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)
|
if (ent->v->movetype == MOVETYPE_6DOF)
|
||||||
|
@ -2792,22 +2792,8 @@ void SV_FlushBroadcasts (void)
|
||||||
if (client->protocol == SCP_BAD)
|
if (client->protocol == SCP_BAD)
|
||||||
continue; //botclient
|
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
|
#ifdef NQPROT
|
||||||
if (!ISQWCLIENT(client))
|
if (ISNQCLIENT(client))
|
||||||
{
|
{
|
||||||
if (client->pextknown)
|
if (client->pextknown)
|
||||||
{
|
{
|
||||||
|
@ -2845,10 +2831,6 @@ void SV_FlushBroadcasts (void)
|
||||||
SZ_Clear (&sv.nqreliable_datagram);
|
SZ_Clear (&sv.nqreliable_datagram);
|
||||||
SZ_Clear (&sv.nqdatagram);
|
SZ_Clear (&sv.nqdatagram);
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q2SERVER
|
|
||||||
SZ_Clear (&sv.q2reliable_datagram);
|
|
||||||
SZ_Clear (&sv.q2datagram);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static qboolean SV_SyncInfoBuf(client_t *client)
|
static qboolean SV_SyncInfoBuf(client_t *client)
|
||||||
|
@ -2866,7 +2848,7 @@ static qboolean SV_SyncInfoBuf(client_t *client)
|
||||||
qboolean final;
|
qboolean final;
|
||||||
sizebuf_t *buf;
|
sizebuf_t *buf;
|
||||||
|
|
||||||
if (client->protocol == SCP_QUAKE2)
|
if (ISQ2CLIENT(client))
|
||||||
{ //q2 gamecode is fully responsible for networking this via configstrings.
|
{ //q2 gamecode is fully responsible for networking this via configstrings.
|
||||||
InfoSync_Clear(&client->infosync);
|
InfoSync_Clear(&client->infosync);
|
||||||
return false;
|
return false;
|
||||||
|
@ -3272,10 +3254,6 @@ void SV_UpdateToReliableMessages (void)
|
||||||
if (sv.nqdatagram.overflowed)
|
if (sv.nqdatagram.overflowed)
|
||||||
SZ_Clear (&sv.nqdatagram);
|
SZ_Clear (&sv.nqdatagram);
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q2SERVER
|
|
||||||
if (sv.q2datagram.overflowed)
|
|
||||||
SZ_Clear (&sv.q2datagram);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SV_FlushBroadcasts();
|
SV_FlushBroadcasts();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue