Re-structuring

This commit is contained in:
Anuken
2019-01-03 19:46:25 -05:00
parent e24d96da6f
commit 153e6c5f1b
46 changed files with 39 additions and 2384 deletions
@@ -32,8 +32,6 @@ public class NetworkIO{
//--GENERAL STATE--
stream.writeByte(state.mode.ordinal()); //gamemode
stream.writeUTF(world.getMap().name); //map name
stream.writeInt(world.getSector() == null ? invalidSector : world.getSector().pos()); //sector ID
stream.writeInt(world.getSector() == null ? 0 : world.getSector().completedMissions);
//write tags
ObjectMap<String, String> tags = world.getMap().meta.tags;
@@ -126,16 +124,6 @@ public class NetworkIO{
//general state
byte mode = stream.readByte();
String map = stream.readUTF();
int sector = stream.readInt();
int missions = stream.readInt();
if(sector != invalidSector){
world.sectors.createSector(Pack.leftShort(sector), Pack.rightShort(sector));
world.setSector(world.sectors.get(sector));
world.getSector().completedMissions = missions;
}else{
world.setSector(null);
}
ObjectMap<String, String> tags = new ObjectMap<>();
+1 -1
View File
@@ -14,7 +14,7 @@ public class Packets{
public enum KickReason{
kick, clientOutdated, serverOutdated, banned, gameover(true), recentKick,
nameInUse, idInUse, nameEmpty, customClient, sectorComplete, serverClose;
nameInUse, idInUse, nameEmpty, customClient, serverClose;
public final boolean quiet;