From 00cca0ea847ea8e321476519c84356d7288211fd Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 8 Aug 2009 12:43:35 +0000 Subject: [PATCH] Fixed some client protocol bugs. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3343 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/sv_send.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/engine/server/sv_send.c b/engine/server/sv_send.c index 063d14d95..f625956df 100644 --- a/engine/server/sv_send.c +++ b/engine/server/sv_send.c @@ -448,8 +448,16 @@ void VARGS SV_BroadcastCommand (char *fmt, ...) continue; if (cl->state>=cs_connected) { - ClientReliableWrite_Begin(cl, ISQ2CLIENT(cl)?svcq2_stufftext:svc_stufftext, strlen(string)+2); - ClientReliableWrite_String (cl, string); + if (ISQWCLIENT(cl) || ISNQCLIENT(cl)) + { + ClientReliableWrite_Begin(cl, svc_stufftext, strlen(string)+2); + ClientReliableWrite_String (cl, string); + } + else if (ISQ2CLIENT(cl)) + { + ClientReliableWrite_Begin(cl, svcq2_stufftext, strlen(string)+2); + ClientReliableWrite_String (cl, string); + } } } } @@ -1684,7 +1692,7 @@ qboolean SV_SendClientDatagram (client_t *client) fnum = client->netchan.outgoing_sequence; sentbytes = Netchan_Transmit (&client->netchan, msg.cursize, buf, SV_RateForClient(client)); - if (client->frameunion.frames) + if (ISQWCLIENT(client) || ISNQCLIENT(client)) client->frameunion.frames[fnum & UPDATE_MASK].packetsizeout += sentbytes; return true; } @@ -2173,7 +2181,7 @@ void SV_SendClientMessages (void) SV_DarkPlacesDownloadChunk(c, &c->datagram); fnum = c->netchan.outgoing_sequence; sentbytes = Netchan_Transmit (&c->netchan, c->datagram.cursize, c->datagram.data, SV_RateForClient(c)); // just update reliable - if (c->frameunion.frames) + if (ISQWCLIENT(c) || ISNQCLIENT(c)) c->frameunion.frames[fnum & UPDATE_MASK].packetsizeout += sentbytes; c->datagram.cursize = 0; }