1
0
Fork 0
forked from fte/fteqw

Make sure backbuf net primitives don't get corrupted. This is presumably what was causing the wrongly-sized angles / illegible server message issues that fortressone was having.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6020 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2021-08-14 04:04:15 +00:00
parent afe62bcf7f
commit f0aea54e5d
4 changed files with 9 additions and 3 deletions

View file

@ -748,7 +748,8 @@ void SV_SetupNetworkBuffers(qboolean bigcoords)
//make sure those are kept up to date too.
svs.clients[i].datagram.prim =
svs.clients[i].netchan.message.prim = svs.clients[i].netchan.netprim;
svs.clients[i].netchan.message.prim =
svs.clients[i].backbuf.prim = svs.clients[i].netchan.netprim;
}
//

View file

@ -2362,6 +2362,7 @@ client_t *SV_AddSplit(client_t *controller, char *info, int id)
cl->spectator = asspec;
cl->netchan.remote_address = controller->netchan.remote_address;
cl->netchan.message.prim = controller->netchan.message.prim;
cl->backbuf.prim = controller->backbuf.prim;
cl->netchan.netprim = controller->netchan.netprim;
cl->zquake_extensions = controller->zquake_extensions;
cl->fteprotocolextensions = controller->fteprotocolextensions;
@ -2968,8 +2969,9 @@ void SV_DoDirectConnect(svconnectinfo_t *fte_restrict info)
else
newcl->datagram.maxsize = MAX_DATAGRAM;
newcl->netchan.netprim = svs.netprim;
newcl->datagram.prim = svs.netprim;
newcl->netchan.netprim =
newcl->datagram.prim =
newcl->backbuf.prim =
newcl->netchan.message.prim = svs.netprim;
SV_ClientProtocolExtensionsChanged(newcl);

View file

@ -33,6 +33,7 @@ void ClientReliableCheckBlock(client_t *cl, int maxsize)
if (!cl->num_backbuf)
{
memset(&cl->backbuf, 0, sizeof(cl->backbuf));
cl->backbuf.prim = cl->netchan.message.prim;
cl->backbuf.allowoverflow = true;
cl->backbuf.data = cl->backbuf_data[0];
cl->backbuf.maxsize = min(cl->netchan.message.maxsize, sizeof(cl->backbuf_data[0]));
@ -52,6 +53,7 @@ void ClientReliableCheckBlock(client_t *cl, int maxsize)
return;
}
memset(&cl->backbuf, 0, sizeof(cl->backbuf));
cl->backbuf.prim = cl->netchan.message.prim;
cl->backbuf.allowoverflow = true;
cl->backbuf.data = cl->backbuf_data[cl->num_backbuf];
cl->backbuf.maxsize = min(cl->netchan.message.maxsize, sizeof(cl->backbuf_data[cl->num_backbuf]));

View file

@ -3607,6 +3607,7 @@ void SV_SendClientMessages (void)
if (c->num_backbuf)
{
memset(&c->backbuf, 0, sizeof(c->backbuf));
c->backbuf.prim = c->netchan.message.prim;
c->backbuf.data = c->backbuf_data[c->num_backbuf - 1];
c->backbuf.cursize = c->backbuf_size[c->num_backbuf - 1];
c->backbuf.maxsize = min(c->netchan.message.maxsize, sizeof(c->backbuf_data[c->num_backbuf-1]));