mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-09 10:50:56 +00:00
- add some comments to SV_ReliableSVC_Emit
- don't push back the backbuffer if it's got max buffers already
This commit is contained in:
parent
f9171ca275
commit
93bd170770
1 changed files with 5 additions and 2 deletions
|
@ -56,6 +56,8 @@ PushBackbuf (client_t *cl)
|
|||
cl->num_backbuf++;
|
||||
}
|
||||
|
||||
// Writes the given block into either cl->netchan.message, or the
|
||||
// backbuffer if there's no room
|
||||
void
|
||||
SV_ReliableSVC_Emit (client_t *cl, int type, void *block)
|
||||
{
|
||||
|
@ -72,7 +74,7 @@ SV_ReliableSVC_Emit (client_t *cl, int type, void *block)
|
|||
cl->netchan.message.cursize = oldsize;
|
||||
}
|
||||
|
||||
if (retval == NET_SHORT) {
|
||||
if (retval == NET_SHORT && cl->num_backbuf < MAX_BACK_BUFFERS) {
|
||||
PushBackbuf (cl);
|
||||
retval = NET_SVC_Emit (type, block, &cl->backbuf);
|
||||
}
|
||||
|
@ -82,7 +84,8 @@ SV_ReliableSVC_Emit (client_t *cl, int type, void *block)
|
|||
SV_Printf ("SV_ReliableSVC_Emit: WARNING: reliable "
|
||||
"overflow for %s with %d (%s) block\n",
|
||||
cl->name, type, NET_SVC_GetString (type));
|
||||
cl->netchan.message.overflowed = true;
|
||||
cl->netchan.message.overflowed = true; // this will drop
|
||||
// the client
|
||||
break;
|
||||
case NET_ERROR:
|
||||
Sys_Error ("SV_ReliableSVC_Emit: error emitting %d (%s) "
|
||||
|
|
Loading…
Reference in a new issue