From 08f49671ef32ee8bf71713bccb2a5204667e5d1a Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 21 Aug 2022 04:15:59 -0700 Subject: [PATCH] Send ASKINFO packet after hole punching Time spent in I_NetRequestHolePunch no longer counts toward ping measurement in the server list. --- src/d_clisrv.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index fff35144..26f0383c 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1933,7 +1933,16 @@ static void CL_LoadReceivedSavegame(void) #ifndef NONET static void SendAskInfo(INT32 node) { - const tic_t asktime = I_GetTime(); + tic_t asktime; + + if (node != 0 && node != BROADCASTADDR && + cv_rendezvousserver.string[0]) + { + I_NetRequestHolePunch(); + } + + asktime = I_GetTime(); + netbuffer->packettype = PT_ASKINFO; netbuffer->u.askinfo.version = VERSION; netbuffer->u.askinfo.time = (tic_t)LONG(asktime); @@ -1942,12 +1951,6 @@ static void SendAskInfo(INT32 node) // now allowed traffic from the host to us in, so once the MS relays // our address to the host, it'll be able to speak to us. HSendPacket(node, false, 0, sizeof (askinfo_pak)); - - if (node != 0 && node != BROADCASTADDR && - cv_rendezvousserver.string[0]) - { - I_NetRequestHolePunch(); - } } serverelem_t serverlist[MAXSERVERLIST];