mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-10 07:12:03 +00:00
Don't do anything hole punching related if rendezvousserver is unset
This commit is contained in:
parent
307cdf7039
commit
df59f3580d
2 changed files with 16 additions and 9 deletions
|
@ -1909,8 +1909,11 @@ static void SendAskInfo(INT32 node)
|
|||
// 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)
|
||||
if (node != 0 && node != BROADCASTADDR &&
|
||||
cv_rendezvousserver.string[0])
|
||||
{
|
||||
I_NetRequestHolePunch();
|
||||
}
|
||||
}
|
||||
|
||||
serverelem_t serverlist[MAXSERVERLIST];
|
||||
|
@ -5730,6 +5733,8 @@ static void UpdatePingTable(void)
|
|||
|
||||
static void RenewHolePunch(void)
|
||||
{
|
||||
if (cv_rendezvousserver.string[0])
|
||||
{
|
||||
static time_t past;
|
||||
|
||||
const time_t now = time(NULL);
|
||||
|
@ -5739,6 +5744,7 @@ static void RenewHolePunch(void)
|
|||
I_NetRegisterHolePunch();
|
||||
past = now;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Handle timeouts to prevent definitive freezes from happenning
|
||||
|
|
|
@ -600,7 +600,8 @@ void Command_Numnodes(void)
|
|||
#ifndef NONET
|
||||
static boolean hole_punch(ssize_t c)
|
||||
{
|
||||
if (c == 10 && holepunchpacket->magic == hole_punch_magic)
|
||||
if (cv_rendezvousserver.string[0] &&
|
||||
c == 10 && holepunchpacket->magic == hole_punch_magic)
|
||||
{
|
||||
mysockaddr_t addr;
|
||||
addr.ip4.sin_family = AF_INET;
|
||||
|
|
Loading…
Reference in a new issue