From 0896e57367d1c303a7b91804d32165983d30e455 Mon Sep 17 00:00:00 2001 From: Mark Olsen Date: Sun, 5 Oct 2008 16:18:17 +0000 Subject: [PATCH] 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 --- fteqtv/qw.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fteqtv/qw.c b/fteqtv/qw.c index 291df2d93..7c8d55c6f 100644 --- a/fteqtv/qw.c +++ b/fteqtv/qw.c @@ -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);