Improved Discord RPC, refactored Input and fixed net crash
This commit is contained in:
@@ -6,9 +6,11 @@ import com.badlogic.gdx.utils.IntArray;
|
||||
import com.badlogic.gdx.utils.IntMap;
|
||||
import com.badlogic.gdx.utils.ObjectMap;
|
||||
import com.badlogic.gdx.utils.async.AsyncExecutor;
|
||||
import io.anuke.mindustry.Mindustry;
|
||||
import io.anuke.mindustry.net.Streamable.StreamBegin;
|
||||
import io.anuke.mindustry.net.Streamable.StreamBuilder;
|
||||
import io.anuke.mindustry.net.Streamable.StreamChunk;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.function.Consumer;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -31,6 +33,8 @@ public class Net{
|
||||
clientProvider.connect(ip, port);
|
||||
active = true;
|
||||
server = false;
|
||||
|
||||
Timers.runTask(60f, Mindustry.platforms::updateRPC);
|
||||
}
|
||||
|
||||
/**Host a server at an address*/
|
||||
@@ -38,6 +42,8 @@ public class Net{
|
||||
serverProvider.host(port);
|
||||
active = true;
|
||||
server = true;
|
||||
|
||||
Timers.runTask(60f, Mindustry.platforms::updateRPC);
|
||||
}
|
||||
|
||||
/**Closes the server.*/
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package io.anuke.mindustry.net;
|
||||
|
||||
import io.anuke.mindustry.entities.Player;
|
||||
import io.anuke.mindustry.entities.enemies.Enemy;
|
||||
|
||||
/**Class for storing all packets.*/
|
||||
public class Packets {
|
||||
@@ -86,8 +85,7 @@ public class Packets {
|
||||
}
|
||||
|
||||
public static class EnemySpawnPacket{
|
||||
public Class<? extends Enemy> type;
|
||||
public byte lane, tier;
|
||||
public byte type, lane, tier;
|
||||
public float x, y;
|
||||
public int id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user