Fixed More Bugs
Fixed the issue with integrated servers causing circular updates between the combined server and client. We now check on the client side whether the connection we're receiving data from is a memory connection (which is presumably only used by integrated servers). If so, the client ignores any incoming packets. We don't just disable update events altogether because LAN games will require updating remote clients. Also fixed a bug in PocketManager.unload() - we weren't setting isLoaded to false after unloading everything and unregisterPockets() had to be called before setting dimensionData to null.
This commit is contained in:
@@ -38,6 +38,11 @@ public class ClientPacketHandler implements IPacketHandler, IUpdateSource
|
||||
if (!packet.channel.equals(PacketConstants.CHANNEL_NAME))
|
||||
return;
|
||||
|
||||
// If this is a memory connection, then our client is running an integrated server.
|
||||
// We can tell by checking if packet size is 0.
|
||||
if (manager.packetSize() == 0)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
DataInputStream input = new DataInputStream(new ByteArrayInputStream(packet.data));
|
||||
|
||||
Reference in New Issue
Block a user