Crash fixes / New ammo types / New turrets / Missiles added

This commit is contained in:
Anuken
2018-07-01 14:36:16 -04:00
parent 7177e0a576
commit 02b8e34242
48 changed files with 1182 additions and 931 deletions

View File

@@ -1,11 +1,11 @@
package io.anuke.kryonet;
import com.badlogic.gdx.utils.Pools;
import com.badlogic.gdx.utils.reflect.ClassReflection;
import com.esotericsoftware.kryonet.FrameworkMessage;
import com.esotericsoftware.kryonet.serialization.Serialization;
import io.anuke.mindustry.net.Packet;
import io.anuke.mindustry.net.Registrator;
import io.anuke.ucore.util.Pooling;
import java.nio.ByteBuffer;
@@ -27,7 +27,7 @@ public class ByteSerializer implements Serialization {
byteBuffer.put(id);
((Packet) o).write(byteBuffer);
synchronized (packetPoolLock) {
Pools.free(o);
Pooling.free(o);
}
}
}
@@ -40,7 +40,7 @@ public class ByteSerializer implements Serialization {
}else{
Class<?> type = Registrator.getByID(id);
synchronized (packetPoolLock) {
Packet packet = (Packet) Pools.obtain(type);
Packet packet = (Packet) Pooling.obtain(type);
packet.read(byteBuffer);
return packet;
}