From 101428297ef12c685e224e9b6a9d521c2c9ca039 Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 10 Mar 2006 05:21:43 +0000 Subject: [PATCH] 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 --- sv_main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 { -- 2.39.2