- 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:
Adam Olsen 2001-12-09 09:40:53 +00:00
parent f9171ca275
commit 93bd170770

View file

@ -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) "