]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_main.c
added back the hacky NAT routing fix since it actually does work, the win32 problems...
[xonotic/darkplaces.git] / sv_main.c
index fde0d7490b0ba0d08ba7f645366f65fb292eee91..d8c47b0d5e7f3d4b6161d5259598ba55f294864c 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -333,7 +333,14 @@ void SV_ConnectClient (int clientnum)
                        client->spawn_parms[i] = (&pr_global_struct->parm1)[i];
        }
 
+#if NOROUTINGFIX
        SV_SendServerinfo (client);
+#else
+       // send serverinfo on first nop
+       client->waitingforconnect = true;
+       client->sendsignon = true;
+       client->spawned = false;                // need prespawn, spawn, etc
+#endif
 }
 
 
@@ -1345,7 +1352,7 @@ qboolean SV_SendClientDatagram (client_t *client)
        MSG_WriteByte (&msg, svc_time);
        MSG_WriteFloat (&msg, sv.time);
 
-       if (!client->sendsignon)
+       if (client->spawned)
        {
                // add the client specific data to the datagram
                SV_WriteClientdataToMessage (client->edict, &msg);
@@ -1448,6 +1455,14 @@ void SV_SendClientMessages (void)
                if (!host_client->active)
                        continue;
 
+#ifndef NOROUTINGFIX
+               if (host_client->sendserverinfo)
+               {
+                       host_client->sendserverinfo = false;
+                       SV_SendServerinfo (host_client);
+               }
+#endif
+
                if (host_client->spawned)
                {
                        if (!SV_SendClientDatagram (host_client))