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 )

View File

@@ -173,7 +173,6 @@ def options(opt):
help = 'disables rpath, duh!')
# a1ba: special option for me
grp.add_option('--debug-all-servers', action='store_true', dest='ALL_SERVERS', default=False, help='')
grp.add_option('--enable-msvcdeps', action='store_true', dest='MSVCDEPS', default=False, help='')
grp.add_option('--enable-wafcache', action='store_true', dest='WAFCACHE', default=False, help='')
@@ -445,7 +444,6 @@ def configure(conf):
conf.env.GAMEDIR = conf.options.GAMEDIR
conf.define('XASH_GAMEDIR', conf.options.GAMEDIR)
conf.define_cond('XASH_ALL_SERVERS', conf.options.ALL_SERVERS)
if conf.env.DEST_OS == 'nswitch':
conf.check_cfg(package='solder', args='--cflags --libs', uselib_store='SOLDER')