More attempts that may fix things?

I'm uncommenting a bunch of LJ code that was never
committed uncommented, so I might be breaking something
horribly here....
This commit is contained in:
fickleheart 2019-03-25 22:44:34 -05:00
parent a35e9d5abd
commit 3455791054

View file

@ -1184,6 +1184,13 @@ boolean HGetPacket(void)
return false; return false;
} }
if (nodejustjoined)
{
// Reinitialize vars for the new node just in case there's anything left over from other players.....
InitNode(&nodes[doomcom->remotenode]);
SV_AbortSendFiles(doomcom->remotenode);
}
getbytes += packetheaderlength + doomcom->datalength; // For stat getbytes += packetheaderlength + doomcom->datalength; // For stat
if (doomcom->remotenode >= MAXNETNODES) if (doomcom->remotenode >= MAXNETNODES)
@ -1197,8 +1204,8 @@ boolean HGetPacket(void)
if (netbuffer->checksum != NetbufferChecksum()) if (netbuffer->checksum != NetbufferChecksum())
{ {
DEBFILE("Bad packet checksum\n"); DEBFILE("Bad packet checksum\n");
//Net_CloseConnection(nodejustjoined ? (doomcom->remotenode | FORCECLOSE) : doomcom->remotenode); Net_CloseConnection(nodejustjoined ? (doomcom->remotenode | FORCECLOSE) : doomcom->remotenode);
Net_CloseConnection(doomcom->remotenode); //Net_CloseConnection(doomcom->remotenode);
continue; continue;
} }
@ -1207,7 +1214,7 @@ boolean HGetPacket(void)
DebugPrintpacket("GET"); DebugPrintpacket("GET");
#endif #endif
/*// If a new node sends an unexpected packet, just ignore it // If a new node sends an unexpected packet, just ignore it
if (nodejustjoined && server if (nodejustjoined && server
&& !(netbuffer->packettype == PT_ASKINFO && !(netbuffer->packettype == PT_ASKINFO
|| netbuffer->packettype == PT_SERVERINFO || netbuffer->packettype == PT_SERVERINFO
@ -1220,7 +1227,7 @@ boolean HGetPacket(void)
//CONS_Alert(CONS_NOTICE, "New node sent an unexpected %s packet\n", packettypename[netbuffer->packettype]); //CONS_Alert(CONS_NOTICE, "New node sent an unexpected %s packet\n", packettypename[netbuffer->packettype]);
Net_CloseConnection(doomcom->remotenode | FORCECLOSE); Net_CloseConnection(doomcom->remotenode | FORCECLOSE);
continue; continue;
}*/ }
// Proceed the ack and ackreturn field // Proceed the ack and ackreturn field
if (!Processackpak()) if (!Processackpak())