Updated: now the disconnected player before the crash are ignored for the game restarting

This commit is contained in:
rubenpirreram
2026-05-10 22:29:42 +02:00
parent 8106adb0d0
commit ef34f780a3
3 changed files with 10 additions and 3 deletions
@@ -86,7 +86,7 @@ public class RMIServer extends UnicastRemoteObject implements IGameServer {
clients.put(username, callback);
System.out.println("Reconnected player: " + username);
startWatchdog(username);
callback.onGameInit(model);
callback.onGameInit(controller.getModel());
System.out.println("Model sent: " + username);
actionQueue.add(new ReconnectPlayer(username));
return true;
@@ -112,7 +112,7 @@ public class RMIServer extends UnicastRemoteObject implements IGameServer {
clients.put(username, callback);
System.out.println("Reconnected player: " + username);
startWatchdog(username);
callback.onGameInit(model);
callback.onGameInit(controller.getModel());
System.out.println("Model sent: " + username);
actionQueue.add(new ReconnectPlayer(username));
return true;