Only send connection packets to unconnected players -- prevents flooding until sync packets aggregated

This commit is contained in:
Collin Smith
2019-12-28 22:45:42 -08:00
parent 03c620d574
commit 25e057c08a
2 changed files with 7 additions and 4 deletions

View File

@ -115,7 +115,7 @@ public class ClientNetworkSyncronizer extends IntervalSystem {
while (buffer.hasRemaining()) {
int size = ByteBufferUtil.getSizePrefix(buffer);
D2GS.getRootAsD2GS(ByteBufferUtil.removeSizePrefix(buffer), d2gs);
if (DEBUG_PACKET) Gdx.app.debug(TAG, "packet type " + D2GSData.name(d2gs.dataType()) + ":" + ByteBufferUtil.getSizePrefix(buffer) + "B");
if (DEBUG_PACKET) Gdx.app.debug(TAG, "packet type " + D2GSData.name(d2gs.dataType()) + ":" + size + "B");
connected = d2gs.dataType() == D2GSData.Connection;
if (!connected) {
if (DEBUG_CONNECT) Gdx.app.debug(TAG, "dropping... ");