readd check for node before SV_SendSaveGame
Apparently in some cases the server will connect to itself, in this case the server tries to send itself the savegame, leading to a crash in some cases. oops
This commit is contained in:
1 parent
9b8a86a47d
commit
ec5afd3caf
1 file changed
+6
-3
+6
-3
@@ -4783,7 +4783,7 @@ static size_t TotalTextCmdPerTic(tic_t tic)
|
||||
static void PT_ClientJoin(SINT8 node)
|
||||
{
|
||||
// Ignore duplicate packets
|
||||
if (client || nodeingame[node]|| levelloading)
|
||||
if (client || nodeingame[node] || levelloading)
|
||||
return;
|
||||
|
||||
doomdata_t *netbuffer = DOOMCOM_DATA(doomcom);
|
||||
@@ -4920,8 +4920,11 @@ static void PT_ClientJoin(SINT8 node)
|
||||
|
||||
if (nodewaiting[node])
|
||||
{
|
||||
SV_SendSaveGame(node, false); // send a complete game state
|
||||
DEBFILE("send savegame\n");
|
||||
if (node)
|
||||
{
|
||||
SV_SendSaveGame(node, false); // send a complete game state
|
||||
DEBFILE("send savegame\n");
|
||||
}
|
||||
|
||||
SV_AddWaitingPlayers(node);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user