From: havoc Date: Fri, 10 Mar 2006 05:21:43 +0000 (+0000) Subject: fixed bug that caused SV_SpawnServer to fail to send reconnect commands to clients... X-Git-Tag: xonotic-v0.1.0preview~4227 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=101428297ef12c685e224e9b6a9d521c2c9ca039;p=xonotic%2Fdarkplaces.git fixed bug that caused SV_SpawnServer to fail to send reconnect commands to clients (it was using sv.reliable_datagram which is immediately cleared and thus not sent) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6089 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sv_main.c b/sv_main.c index 9c03d0a6..648e107b 100644 --- a/sv_main.c +++ b/sv_main.c @@ -1673,9 +1673,15 @@ void SV_SpawnServer (const char *server) // if (sv.active) { - // Tell all the clients that the server is changing levels - MSG_WriteByte(&sv.reliable_datagram, svc_stufftext); - MSG_WriteString(&sv.reliable_datagram, "reconnect\n"); + client_t *client; + for (i = 0, client = svs.clients;i < svs.maxclients;i++, client++) + { + if (client->netconnection) + { + MSG_WriteByte(&client->netconnection->message, svc_stufftext); + MSG_WriteString(&client->netconnection->message, "reconnect\n"); + } + } } else {