mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 20:31:30 +00:00
Abstain from handling connections instead if the level is loading
This commit is contained in:
parent
63f87b4cec
commit
4fdbfb1dc2
3 changed files with 17 additions and 23 deletions
|
@ -5011,7 +5011,7 @@ FILESTAMP
|
||||||
{
|
{
|
||||||
node = (SINT8)doomcom->remotenode;
|
node = (SINT8)doomcom->remotenode;
|
||||||
|
|
||||||
if (netbuffer->packettype == PT_CLIENTJOIN && server)
|
if (netbuffer->packettype == PT_CLIENTJOIN && server && !levelloading)
|
||||||
{
|
{
|
||||||
HandleConnect(node);
|
HandleConnect(node);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -1597,9 +1597,9 @@ void D_SRB2Main(void)
|
||||||
{
|
{
|
||||||
pagename = "TITLESKY";
|
pagename = "TITLESKY";
|
||||||
levelstarttic = gametic;
|
levelstarttic = gametic;
|
||||||
|
G_SetGamestate(GS_LEVEL);
|
||||||
if (!P_SetupLevel(false))
|
if (!P_SetupLevel(false))
|
||||||
I_Quit(); // fail so reset game stuff
|
I_Quit(); // fail so reset game stuff
|
||||||
G_SetGamestate(GS_LEVEL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_DISCORDRPC
|
#ifdef HAVE_DISCORDRPC
|
||||||
|
|
22
src/g_game.c
22
src/g_game.c
|
@ -1733,20 +1733,6 @@ void G_DoLoadLevel(boolean resetplayer)
|
||||||
Y_EndIntermission();
|
Y_EndIntermission();
|
||||||
if (gamestate == GS_VOTING)
|
if (gamestate == GS_VOTING)
|
||||||
Y_EndVote();
|
Y_EndVote();
|
||||||
// Don't allow people to download a partial/corrupted
|
|
||||||
// save while the server's loading the map/during the wipe.
|
|
||||||
// (this addresses "map" command usage, which means
|
|
||||||
// transitions/different gamestates would be skipped.)
|
|
||||||
if (gamestate == GS_LEVEL)
|
|
||||||
gamestate = GS_WAITINGPLAYERS;
|
|
||||||
|
|
||||||
// Setup the level.
|
|
||||||
if (!P_SetupLevel(false))
|
|
||||||
{
|
|
||||||
// fail so reset game stuff
|
|
||||||
Command_ExitGame_f();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
G_SetGamestate(GS_LEVEL);
|
G_SetGamestate(GS_LEVEL);
|
||||||
|
|
||||||
|
@ -1756,6 +1742,14 @@ void G_DoLoadLevel(boolean resetplayer)
|
||||||
players[i].playerstate = PST_REBORN;
|
players[i].playerstate = PST_REBORN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Setup the level.
|
||||||
|
if (!P_SetupLevel(false))
|
||||||
|
{
|
||||||
|
// fail so reset game stuff
|
||||||
|
Command_ExitGame_f();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!resetplayer)
|
if (!resetplayer)
|
||||||
P_FindEmerald();
|
P_FindEmerald();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue