]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
add the prvm_badvalue variable needed by the last commit
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index 930eaf5633461f4a599fa61785077fa3ace0eae0..812c2146e60787e13d27640cbeaa53591794b148 100644 (file)
--- a/host.c
+++ b/host.c
@@ -445,7 +445,7 @@ void SV_DropClient(qboolean crash)
 
        if (host_client->netconnection)
        {
-               // free the client (the body stays around)
+               // tell the client to be gone
                if (!crash)
                {
                        // LordHavoc: no opportunity for resending, so use unreliable 3 times
@@ -459,9 +459,6 @@ void SV_DropClient(qboolean crash)
                        NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol, 10000, false);
                        NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol, 10000, false);
                }
-               // break the net connection
-               NetConn_Close(host_client->netconnection);
-               host_client->netconnection = NULL;
        }
 
        // call qc ClientDisconnect function
@@ -478,6 +475,13 @@ void SV_DropClient(qboolean crash)
                prog->globals.server->self = saveSelf;
        }
 
+       if (host_client->netconnection)
+       {
+               // break the net connection
+               NetConn_Close(host_client->netconnection);
+               host_client->netconnection = NULL;
+       }
+
        // if a download is active, close it
        if (host_client->download_file)
        {