mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 04:11:18 +00:00
Send ASKINFO packet after hole punching
Time spent in I_NetRequestHolePunch no longer counts toward ping measurement in the server list.
This commit is contained in:
parent
1551e4572d
commit
08f49671ef
1 changed files with 10 additions and 7 deletions
|
@ -1933,7 +1933,16 @@ static void CL_LoadReceivedSavegame(void)
|
||||||
#ifndef NONET
|
#ifndef NONET
|
||||||
static void SendAskInfo(INT32 node)
|
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->packettype = PT_ASKINFO;
|
||||||
netbuffer->u.askinfo.version = VERSION;
|
netbuffer->u.askinfo.version = VERSION;
|
||||||
netbuffer->u.askinfo.time = (tic_t)LONG(asktime);
|
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
|
// 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.
|
// our address to the host, it'll be able to speak to us.
|
||||||
HSendPacket(node, false, 0, sizeof (askinfo_pak));
|
HSendPacket(node, false, 0, sizeof (askinfo_pak));
|
||||||
|
|
||||||
if (node != 0 && node != BROADCASTADDR &&
|
|
||||||
cv_rendezvousserver.string[0])
|
|
||||||
{
|
|
||||||
I_NetRequestHolePunch();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
serverelem_t serverlist[MAXSERVERLIST];
|
serverelem_t serverlist[MAXSERVERLIST];
|
||||||
|
|
Loading…
Reference in a new issue