From: havoc Date: Mon, 26 May 2003 01:01:36 +0000 (+0000) Subject: fixed connection process again X-Git-Tag: xonotic-v0.1.0preview~6612 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=55c92c79a462b74b0cb7c43b4d9a229bc389571a;p=xonotic%2Fdarkplaces.git fixed connection process again added developer prints for changes to sendserverinfo git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3040 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sv_main.c b/sv_main.c index 40cab13e..ca6f27ab 100644 --- 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 diff --git a/sv_user.c b/sv_user.c index 48a576cd..4b7d68a7 100644 --- 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; }