From: havoc Date: Thu, 9 Mar 2006 16:19:23 +0000 (+0000) Subject: fixed bug that caused ClientDisconnect to not be called on bots in their first level... X-Git-Tag: xonotic-v0.1.0preview~4233 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=6ccf17670c1c9e21562e58ea4f05964c475ab3c3;p=xonotic%2Fdarkplaces.git fixed bug that caused ClientDisconnect to not be called on bots in their first level (it did get called on their second level onward), this fix does however assume the QC code will call ClientConnect every time it uses spawnclient git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6083 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/svvm_cmds.c b/svvm_cmds.c index c178bab9..860d7a02 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -2440,6 +2440,9 @@ void PF_spawnclient (void) { prog->xfunction->builtinsprofile += 100; SV_ConnectClient (i, NULL); + // this has to be set or else ClientDisconnect won't be called + // we assume the qc will call ClientConnect... + svs.clients[i].clientconnectcalled = true; ed = PRVM_EDICT_NUM(i + 1); break; }