engine: fix skewed ping calculation, drop --debug-all-servers

This commit is contained in:
Alibek Omarov
2026-06-07 03:17:45 +05:00
parent 7db12ade3a
commit 2d39a7fa24
4 changed files with 22 additions and 9 deletions

View File

@@ -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();
}
/*

View File

@@ -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

View File

@@ -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 )