2 Commits

Author SHA1 Message Date
c3610c47c9 send disconnect packet
All checks were successful
Linux arm64 / Build (push) Successful in 38s
2025-02-02 23:13:56 +01:00
08ed9b46b1 fix multi login 2025-02-02 23:13:28 +01:00
2 changed files with 2 additions and 1 deletions

View File

@@ -44,7 +44,7 @@ public class MultiMenu extends BaseView {
ImGui.inputText("Pseudo", pseudo); ImGui.inputText("Pseudo", pseudo);
if (ImGui.button("Rejoindre")) { if (ImGui.button("Rejoindre")) {
try { try {
this.stateMachine.pushState(new ConnexionStatusView(stateMachine, address.get(), (short) port.get())); this.stateMachine.pushState(new ConnexionStatusView(stateMachine, pseudo.get(), address.get(), (short) port.get()));
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }

View File

@@ -31,6 +31,7 @@ public class ClientConnexion extends Connexion {
public void close() { public void close() {
if (!this.isClosed()) { if (!this.isClosed()) {
super.close(); super.close();
sendPacket(new DisconnectPacket(""));
client.onDisconnect.emit(); client.onDisconnect.emit();
} }
} }