mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-09-22 22:07:31 +03:00
Fixed some GWT bugs and errors
This commit is contained in:
parent
bbe3115186
commit
828dd78611
@ -1,7 +1,7 @@
|
||||
#Autogenerated file. Do not modify.
|
||||
#Mon Feb 26 22:08:54 EST 2018
|
||||
#Mon Feb 26 23:26:06 EST 2018
|
||||
version=release
|
||||
androidBuildCode=306
|
||||
androidBuildCode=308
|
||||
name=Mindustry
|
||||
code=3.4
|
||||
build=29
|
||||
|
@ -15,4 +15,5 @@
|
||||
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.net.Packet" />
|
||||
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.net.Streamable" />
|
||||
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.world.BlockBar" />
|
||||
<extend-configuration-property name="gdx.reflect.include" value="com.badlogic.gdx.utils.Predicate" />
|
||||
</module>
|
@ -23,6 +23,8 @@ public class AdminsDialog extends FloatingDialog {
|
||||
private void setup(){
|
||||
content().clear();
|
||||
|
||||
if(gwt) return;
|
||||
|
||||
float w = 400f, h = 80f;
|
||||
|
||||
Table table = new Table();
|
||||
|
@ -20,6 +20,8 @@ public class BansDialog extends FloatingDialog {
|
||||
private void setup(){
|
||||
content().clear();
|
||||
|
||||
if(gwt) return;
|
||||
|
||||
float w = 400f, h = 80f;
|
||||
|
||||
Table table = new Table();
|
||||
|
@ -87,7 +87,7 @@ public class PlayerListFragment implements Fragment{
|
||||
float h = 74f;
|
||||
|
||||
for(Player player : playerGroup.all()){
|
||||
NetConnection connection = Net.getConnection(player.clientid);
|
||||
NetConnection connection = gwt ? null : Net.getConnection(player.clientid);
|
||||
|
||||
if(connection == null && Net.server() && !player.isLocal) continue;
|
||||
|
||||
@ -162,7 +162,7 @@ public class PlayerListFragment implements Fragment{
|
||||
});
|
||||
}
|
||||
}).update(b ->{
|
||||
b.setChecked(connection != null && netServer.admins.isAdmin(connection.address));
|
||||
b.setChecked(player.isAdmin);
|
||||
b.setDisabled(Net.client());
|
||||
}).get().setTouchable(() -> Net.client() ? Touchable.disabled : Touchable.enabled);
|
||||
|
||||
|
@ -404,8 +404,6 @@ public class KryoServer implements ServerProvider {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
class SocketServer extends WebSocketServer {
|
||||
|
||||
public SocketServer(int port) {
|
||||
@ -415,7 +413,7 @@ public class KryoServer implements ServerProvider {
|
||||
@Override
|
||||
public void onOpen(WebSocket conn, ClientHandshake handshake) {
|
||||
Connect connect = new Connect();
|
||||
connect.addressTCP = conn.getRemoteSocketAddress().toString();
|
||||
connect.addressTCP = conn.getRemoteSocketAddress().getAddress().getHostAddress();
|
||||
KryoConnection kn = new KryoConnection(lastconnection ++, connect.addressTCP, conn);
|
||||
|
||||
Log.info("&bRecieved web connection: {0} {1}", kn.id, connect.addressTCP);
|
||||
|
Loading…
Reference in New Issue
Block a user