Send ASKINFO packet after hole punching

Time spent in I_NetRequestHolePunch no longer counts
toward ping measurement in the server list.

# Conflicts:
#	src/d_clisrv.c
This commit is contained in:
James R 2022-08-21 04:15:59 -07:00 committed by toaster
parent 295880351a
commit c9035c3f91

View file

@ -1343,7 +1343,16 @@ static void CL_ReloadReceivedSavegame(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);
@ -1352,9 +1361,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)
I_NetRequestHolePunch();
}
serverelem_t serverlist[MAXSERVERLIST];