Merge branch 'get-ourip-once' into 'master'

Fetch the server IP once

See merge request KartKrew/Kart!1337
This commit is contained in:
James R 2023-07-19 21:39:47 +00:00
commit 6f4d014ebb

View file

@ -4208,20 +4208,24 @@ boolean SV_SpawnServer(void)
serverrunning = true;
SV_ResetServer();
SV_GenContext();
if (netgame && I_NetOpenSocket)
if (netgame)
{
if (I_NetOpenSocket)
{
I_NetOpenSocket();
}
ourIP = 0;
STUN_bind(GotOurIP);
}
// non dedicated server just connect to itself
if (!dedicated)
CL_ConnectToServer();
else doomcom->numslots = 1;
}
ourIP = 0;
if (netgame && server)
STUN_bind(GotOurIP);
// strictly speaking, i'm not convinced the following is necessary
// but I'm not confident enough to remove it entirely in case it breaks something