mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 13:01:56 +00:00
Fetch the server IP once
Fixes ourIP being set on every map change Also catches a possible case where joining clients can sigfail in the window between map change and stun response
This commit is contained in:
parent
a59896ef88
commit
3d6d2694b3
1 changed files with 29 additions and 25 deletions
|
|
@ -4192,9 +4192,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
|
||||||
|
|
@ -4203,9 +4209,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
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue