Updated 'MdgaServer' class.

Updated the 'MdgaServer' class by updating the logic inside the 'connectionAdded' method in it.
This commit is contained in:
Daniel Grigencha
2024-12-02 22:41:17 +01:00
parent 1eb24b7a66
commit e163b87cc4

View File

@@ -218,8 +218,10 @@ public void connectionAdded(Server server, HostedConnection hostedConnection) {
} else {
if (hostedConnection.getAddress().contains("127.0.0.1") && this.logic.getGame().getHost() == -1) {
this.logic.getGame().setHost(hostedConnection.getId());
this.logic.getServerSender().send(hostedConnection.getId(), new LobbyAcceptMessage(hostedConnection.getId()));
} else {
this.logic.getServerSender().send(hostedConnection.getId(), new LobbyAcceptMessage());
}
this.logic.getServerSender().send(hostedConnection.getId(), new LobbyAcceptMessage());
}
}