Added temporary client debug status methods
This commit is contained in:
@@ -568,6 +568,34 @@ public class NetServer implements ApplicationListener{
|
|||||||
player.con.hasDisconnected = true;
|
player.con.hasDisconnected = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//these functions are for debugging only, and will be removed!
|
||||||
|
|
||||||
|
@Remote(targets = Loc.client, variants = Variant.one)
|
||||||
|
public static void requestDebugStatus(Player player){
|
||||||
|
int flags =
|
||||||
|
(player.con.hasDisconnected ? 1 : 0) |
|
||||||
|
(player.con.hasConnected ? 2 : 0) |
|
||||||
|
(player.isAdded() ? 4 : 0) |
|
||||||
|
(player.con.hasBegunConnecting ? 8 : 0);
|
||||||
|
|
||||||
|
Call.debugStatusClient(player.con, flags);
|
||||||
|
Call.debugStatusClientUnreliable(player.con, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Remote(variants = Variant.both, priority = PacketPriority.high)
|
||||||
|
public static void debugStatusClient(int value){
|
||||||
|
Log.info("[RELIABLE] Debug status received. disconnected = @, connected = @, added = @, begunConnecting = @",
|
||||||
|
(value & 1) != 0, (value & 2) != 0, (value & 4) != 0, (value & 8) != 0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Remote(variants = Variant.both, priority = PacketPriority.high, unreliable = true)
|
||||||
|
public static void debugStatusClientUnreliable(int value){
|
||||||
|
Log.info("[UNRELIABLE] Debug status received. disconnected = @, connected = @, added = @, begunConnecting = @",
|
||||||
|
(value & 1) != 0, (value & 2) != 0, (value & 4) != 0, (value & 8) != 0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@Remote(targets = Loc.client)
|
@Remote(targets = Loc.client)
|
||||||
public static void serverPacketReliable(Player player, String type, String contents){
|
public static void serverPacketReliable(Player player, String type, String contents){
|
||||||
if(netServer.customPacketHandlers.containsKey(type)){
|
if(netServer.customPacketHandlers.containsKey(type)){
|
||||||
|
|||||||
+1
-1
@@ -24,4 +24,4 @@ android.useAndroidX=true
|
|||||||
#used for slow jitpack builds; TODO see if this actually works
|
#used for slow jitpack builds; TODO see if this actually works
|
||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
archash=00d1f312
|
archash=0370ef92e5
|
||||||
|
|||||||
Reference in New Issue
Block a user