Send a f_qtv command to the client on first connect.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3040 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Mark Olsen 2008-10-05 16:18:17 +00:00
parent 9f5fb267c3
commit 0896e57367

View file

@ -889,6 +889,8 @@ void NewNQClient(cluster_t *cluster, netadr_t *addr)
viewer->netchan.maxdatagramlen = MAX_NQDATAGRAM;
viewer->netchan.maxreliablelen = MAX_NQMSGLEN;
viewer->firstconnect = true;
viewer->next = cluster->viewers;
cluster->viewers = viewer;
for (i = 0; i < ENTITY_FRAMES; i++)
@ -955,6 +957,8 @@ void NewQWClient(cluster_t *cluster, netadr_t *addr, char *connectmessage)
viewer->netchan.maxdatagramlen = MAX_QWMSGLEN;
viewer->netchan.maxreliablelen = MAX_QWMSGLEN;
viewer->firstconnect = true;
viewer->next = cluster->viewers;
cluster->viewers = viewer;
for (i = 0; i < ENTITY_FRAMES; i++)
@ -3717,6 +3721,11 @@ void ParseQWC(cluster_t *cluster, sv_t *qtv, viewer_t *v, netmsg_t *m)
v->commentator = NULL;
QW_SetCommentator(cluster, v, com);
if (v->firstconnect)
{
QW_StuffcmdToViewer(v, "f_qtv\n");
v->firstconnect = false;
}
if (!v->server)
QTV_Say(cluster, v->server, v, ".menu", false);