mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-12-26 02:14:15 +08:00
decrease min server latency to 2ms
This commit is contained in:
parent
3c9b327fb5
commit
dfbd928311
@ -350,7 +350,10 @@ void Steam_Matchmaking_Servers::ReleaseRequest( HServerListRequest hServerListRe
|
||||
|
||||
void Steam_Matchmaking_Servers::server_details(Gameserver *g, gameserveritem_t *server)
|
||||
{
|
||||
int latency = 10;
|
||||
PRINT_DEBUG("Steam_Matchmaking_Servers::server_details\n");
|
||||
constexpr const static int MIN_LATENCY = 2;
|
||||
|
||||
int latency = MIN_LATENCY;
|
||||
|
||||
if (settings->matchmaking_server_details_via_source_query && !(g->ip() < 0) && !(g->query_port() < 0)) {
|
||||
unsigned char ip[4]{};
|
||||
@ -371,7 +374,9 @@ void Steam_Matchmaking_Servers::server_details(Gameserver *g, gameserveritem_t *
|
||||
A2S_INFO *ssq_a2s_info = ssq_info(ssq);
|
||||
std::chrono::high_resolution_clock::time_point t2 = std::chrono::high_resolution_clock::now();
|
||||
latency = (int)std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count();
|
||||
if (latency < 10) latency = 10; // TODO I don't know if low latency is problematic or not
|
||||
|
||||
// TODO I don't know if low latency is problematic or not, hence this artificial latency
|
||||
if (latency < MIN_LATENCY) latency = MIN_LATENCY;
|
||||
|
||||
if (ssq_server_eok(ssq)) {
|
||||
PRINT_DEBUG(" Steam_Matchmaking_Servers::server_details ssq server info ok\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user