fix: adjust login process for standard
This commit is contained in:
parent
844cc08c49
commit
bf3bd7d0a4
@ -152,7 +152,13 @@ public class LobbyConnection implements Runnable {
|
||||
public void handleReconnect(Participant participant) {
|
||||
participant.disconnected = false;
|
||||
if (state == LobbyConnectionState.Started) {
|
||||
|
||||
GeneralAssignmentMessage response = new GeneralAssignmentMessage();
|
||||
response.gameID = gameID;
|
||||
participant.sendMessage(response);
|
||||
|
||||
sendGameStructure(participant.equals(player1), participant.equals(player2), false);
|
||||
|
||||
lobby.handleReconnect(participant);
|
||||
}
|
||||
}
|
||||
|
@ -181,15 +181,15 @@ public class LobbyManager {
|
||||
|
||||
boolean complete = lobby.setSelection(participant, selected);
|
||||
|
||||
ConfirmSelectionMessage response = new ConfirmSelectionMessage();
|
||||
response.selectionComplete = complete;
|
||||
participant.sendMessage(response);
|
||||
|
||||
if (complete) {
|
||||
lobby.getPlayer1().getClient().setState(ClientState.Playing);
|
||||
lobby.getPlayer2().getClient().setState(ClientState.Playing);
|
||||
lobby.getSpectators().forEach(spectator -> spectator.getClient().setState(ClientState.Playing));
|
||||
LobbyRunner.getInstance().startLobby(lobby);
|
||||
} else {
|
||||
ConfirmSelectionMessage response = new ConfirmSelectionMessage();
|
||||
response.selectionComplete = false;
|
||||
participant.sendMessage(response);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user