mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-04 15:27:19 +07:00
.
This commit is contained in:
@ -7,6 +7,7 @@ import io.anuke.arc.backends.sdl.jni.*;
|
||||
import io.anuke.arc.collection.*;
|
||||
import io.anuke.arc.files.*;
|
||||
import io.anuke.arc.function.*;
|
||||
import io.anuke.arc.scene.event.*;
|
||||
import io.anuke.arc.scene.ui.*;
|
||||
import io.anuke.arc.util.*;
|
||||
import io.anuke.arc.util.Log.*;
|
||||
@ -51,6 +52,7 @@ public class DesktopPlatform extends Platform{
|
||||
Events.on(GameLoadEvent.class, event -> {
|
||||
Label[] label = {null};
|
||||
Core.scene.table(t -> {
|
||||
t.touchable(Touchable.disabled);
|
||||
t.top().left();
|
||||
t.update(t::toFront);
|
||||
t.table("guideDim", f -> {
|
||||
|
@ -51,7 +51,9 @@ public class SteamNetImpl implements SteamNetworkingCallback, SteamMatchmakingCa
|
||||
snet.readP2PPacket(from, readBuffer, 0);
|
||||
int fromID = from.getAccountID();
|
||||
Object output = serializer.read(readBuffer);
|
||||
Log.info("Read {0} of length {1} from {2}", output, length, fromID);
|
||||
if(Net.server()){
|
||||
Log.info("Read {0} of length {1} from {2}", output, length, fromID);
|
||||
}
|
||||
|
||||
Core.app.post(() -> {
|
||||
if(Net.server()){
|
||||
@ -61,7 +63,7 @@ public class SteamNetImpl implements SteamNetworkingCallback, SteamMatchmakingCa
|
||||
}else{
|
||||
Log.err("Unknown user with ID: {0}", fromID);
|
||||
}
|
||||
}else if(fromID == currentServer.getAccountID()){
|
||||
}else if(Net.client() && currentServer != null && fromID == currentServer.getAccountID()){
|
||||
Core.app.post(() -> Net.handleClientReceived(output));
|
||||
}
|
||||
});
|
||||
@ -361,7 +363,7 @@ public class SteamNetImpl implements SteamNetworkingCallback, SteamMatchmakingCa
|
||||
writeBuffer.position(0);
|
||||
serializer.write(writeBuffer, object);
|
||||
writeBuffer.flip();
|
||||
Log.info("Send {0} to {1} mode {2}", object, sid.getAccountID(), mode);
|
||||
//Log.info("Send {0} to {1} mode {2}", object, sid.getAccountID(), mode);
|
||||
|
||||
snet.sendP2PPacket(sid, writeBuffer, mode == SendMode.tcp ? P2PSend.Reliable : P2PSend.UnreliableNoDelay, 0);
|
||||
}catch(Exception e){
|
||||
|
Reference in New Issue
Block a user