]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fixed connection process again
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 26 May 2003 01:01:36 +0000 (01:01 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 26 May 2003 01:01:36 +0000 (01:01 +0000)
added developer prints for changes to sendserverinfo

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

sv_main.c
sv_user.c

index 40cab13e6a5fb15e9569e2e60ac40556d645ba1e..ca6f27ab3a4e428c3ac367d6edd7a0321674996b 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -338,18 +338,10 @@ void SV_ConnectClient (int clientnum)
                        client->spawn_parms[i] = (&pr_global_struct->parm1)[i];
        }
 
-       client->sendserverinfo = false;
-       client->sendsignon = true;
        client->spawned = false;                // need prespawn, spawn, etc
-       // LordHavoc: 1 = attempt to work through NAT routers
-#if 0
-       // send serverinfo immediately (may get lost if client is behind a NAT router)
-       client->waitingforconnect = false;
-       SV_SendServerinfo (client);
-#else
-       // send serverinfo only after receiving a nop from client
        client->waitingforconnect = true;
-#endif
+       client->sendserverinfo = false;
+       client->sendsignon = true;
 }
 
 
@@ -1511,14 +1503,14 @@ void SV_SendClientMessages (void)
                // send a full message when the next signon stage has been requested
                // some other message data (name changes, etc) may accumulate
                // between signon stages
+                       if (host_client->sendserverinfo)
+                       {
+                               Con_DPrintf("SV_SendClientMessages: sending server info to new client\n");
+                               SV_SendServerinfo (host_client);
+                               host_client->sendserverinfo = false;
+                       }
                        if (!host_client->sendsignon)
                        {
-                               if (host_client->sendserverinfo)
-                               {
-                                       host_client->sendserverinfo = false;
-                                       SV_SendServerinfo (host_client);
-                               }
-
                                if (realtime - host_client->last_message > 5)
                                        SV_SendNop (host_client);
                                continue;       // don't send out non-signon messages
index 48a576cd0529afd6aff4c902952376994af15821..4b7d68a79e9987e7eaae8edfce9cb435e23d2833 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -542,6 +542,7 @@ nextmsg:
 
                if (host_client->waitingforconnect)
                {
+                       Con_DPrintf ("SV_ReadClientMessage: setting sendserverinfo to true\n");
                        host_client->waitingforconnect = false;
                        host_client->sendserverinfo = true;
                }