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:
parent
9f5fb267c3
commit
0896e57367
1 changed files with 9 additions and 0 deletions
|
@ -889,6 +889,8 @@ void NewNQClient(cluster_t *cluster, netadr_t *addr)
|
||||||
viewer->netchan.maxdatagramlen = MAX_NQDATAGRAM;
|
viewer->netchan.maxdatagramlen = MAX_NQDATAGRAM;
|
||||||
viewer->netchan.maxreliablelen = MAX_NQMSGLEN;
|
viewer->netchan.maxreliablelen = MAX_NQMSGLEN;
|
||||||
|
|
||||||
|
viewer->firstconnect = true;
|
||||||
|
|
||||||
viewer->next = cluster->viewers;
|
viewer->next = cluster->viewers;
|
||||||
cluster->viewers = viewer;
|
cluster->viewers = viewer;
|
||||||
for (i = 0; i < ENTITY_FRAMES; i++)
|
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.maxdatagramlen = MAX_QWMSGLEN;
|
||||||
viewer->netchan.maxreliablelen = MAX_QWMSGLEN;
|
viewer->netchan.maxreliablelen = MAX_QWMSGLEN;
|
||||||
|
|
||||||
|
viewer->firstconnect = true;
|
||||||
|
|
||||||
viewer->next = cluster->viewers;
|
viewer->next = cluster->viewers;
|
||||||
cluster->viewers = viewer;
|
cluster->viewers = viewer;
|
||||||
for (i = 0; i < ENTITY_FRAMES; i++)
|
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;
|
v->commentator = NULL;
|
||||||
QW_SetCommentator(cluster, v, com);
|
QW_SetCommentator(cluster, v, com);
|
||||||
|
|
||||||
|
if (v->firstconnect)
|
||||||
|
{
|
||||||
|
QW_StuffcmdToViewer(v, "f_qtv\n");
|
||||||
|
v->firstconnect = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!v->server)
|
if (!v->server)
|
||||||
QTV_Say(cluster, v->server, v, ".menu", false);
|
QTV_Say(cluster, v->server, v, ".menu", false);
|
||||||
|
|
Loading…
Reference in a new issue