]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Revert "Tell clients to reconnect before loading the next map. Should fix lag/stutter"
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 29 Mar 2021 20:55:13 +0000 (20:55 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 29 Mar 2021 20:55:13 +0000 (20:55 +0000)
This reverts commit b30c46fb9423afb892b639de58ade85d5dbed03e.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13102 d7cf8633-e32d-0410-b094-e92efae38249

sv_main.c

index 1a48d15bacf79e2e959692ad98044fd3380c70b0..b5186eca8072388e3952170a76e66af4a88fa1b8 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -1791,15 +1791,6 @@ void SV_SpawnServer (const char *map)
 
        if(sv.active)
        {
-               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");
-                       }
-               }
                World_End(&sv.world);
                if(PRVM_serverfunction(SV_Shutdown))
                {
@@ -1842,8 +1833,23 @@ void SV_SpawnServer (const char *map)
 //
 // tell all connected clients that we are going to a new level
 //
-       if (!sv.active)
+       if (sv.active)
+       {
+               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
+       {
+               // open server port
                NetConn_OpenServerPorts(true);
+       }
 
 //
 // make cvars consistant