Updated: now the disconnected player before the crash are ignored for the game restarting
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user