mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: fix skewed ping calculation, drop --debug-all-servers
This commit is contained in:
@@ -2594,6 +2594,21 @@ static void CL_Reject( const char *c, const char *args, netadr_t from )
|
||||
CL_Disconnect_f();
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
CL_NotifyServerListResponse
|
||||
|
||||
=================
|
||||
*/
|
||||
void CL_NotifyServerListResponse( void )
|
||||
{
|
||||
if( !cls.internetservers_pending )
|
||||
return;
|
||||
|
||||
UI_ResetPing();
|
||||
cls.internetservers_pending = false;
|
||||
}
|
||||
|
||||
static void CL_ServerList( netadr_t from, sizebuf_t *msg )
|
||||
{
|
||||
connprotocol_t proto;
|
||||
@@ -2642,11 +2657,7 @@ static void CL_ServerList( netadr_t from, sizebuf_t *msg )
|
||||
NET_QueryServerByAddress( servadr, proto );
|
||||
}
|
||||
|
||||
if( cls.internetservers_pending )
|
||||
{
|
||||
UI_ResetPing();
|
||||
cls.internetservers_pending = false;
|
||||
}
|
||||
CL_NotifyServerListResponse();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -792,6 +792,7 @@ void CL_SignonReply( connprotocol_t proto );
|
||||
void CL_ClearState( void );
|
||||
void CL_SetCheatState( qboolean multiplayer, qboolean allow_cheats );
|
||||
void CL_SendGoldSrcConnectPacket( netadr_t adr, int challenge, const void *ticket, size_t ticketlen );
|
||||
void CL_NotifyServerListResponse( void );
|
||||
|
||||
//
|
||||
// cl_demo.c
|
||||
|
||||
@@ -16,6 +16,7 @@ GNU General Public License for more details.
|
||||
#include "netchan.h"
|
||||
#include "net_ws.h"
|
||||
#include "server.h"
|
||||
#include "client.h"
|
||||
|
||||
typedef struct master_s
|
||||
{
|
||||
@@ -64,9 +65,7 @@ static size_t NET_BuildMasterServerScanRequest( char *buf, size_t size, uint32_t
|
||||
|
||||
Q_strncpy( info, filter, remaining );
|
||||
|
||||
#ifndef XASH_ALL_SERVERS
|
||||
Info_SetValueForKey( info, "gamedir", GI->gamefolder, remaining );
|
||||
#endif // XASH_ALL_SERVERS
|
||||
|
||||
if( proto != PROTO_GOLDSRC )
|
||||
{
|
||||
@@ -301,6 +300,10 @@ static void NET_MasterStaticResponse( const char *url, qboolean success, const b
|
||||
Mem_Free( body );
|
||||
|
||||
Con_Reportf( "masterstatic: %s yielded %d server(s)\n", url, count );
|
||||
|
||||
#if !XASH_DEDICATED
|
||||
CL_NotifyServerListResponse();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void NET_MasterStaticQuery( void )
|
||||
|
||||
Reference in New Issue
Block a user