Discord rich presence tweaks, wave balancing

This commit is contained in:
Anuken
2018-01-08 22:57:07 -05:00
parent 2662c0a8fd
commit 5cac11b3fe
7 changed files with 53 additions and 22 deletions

View File

@@ -68,6 +68,8 @@ public class KryoServer implements ServerProvider {
@Override
public void disconnected (Connection connection) {
connections.removeValue(connection.getID());
Disconnect c = new Disconnect();
c.id = connection.getID();
@@ -77,8 +79,6 @@ public class KryoServer implements ServerProvider {
Gdx.app.exit();
throw new RuntimeException(e);
}
connections.removeValue(c.id);
}
@Override
@@ -104,7 +104,14 @@ public class KryoServer implements ServerProvider {
@Override
public void kick(int connection) {
Connection conn = getByID(connection);
Connection conn;
try {
conn = getByID(connection);
}catch (Exception e){
e.printStackTrace();
connections.removeValue(connection);
return;
}
KickPacket p = new KickPacket();
p.reason = (byte)KickReason.kick.ordinal();