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