mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
Fikser en feil i serveren som hindret en spiller som ikke hadde sendt inn navnet sitt fra å koble fra
This commit is contained in:
parent
224851ce2c
commit
3924189839
@ -19,7 +19,7 @@ import java.io.IOException;
|
|||||||
*/
|
*/
|
||||||
public class StartMenuScreen extends AbstractScreen {
|
public class StartMenuScreen extends AbstractScreen {
|
||||||
private final RoboRallyWrapper roboRallyWrapper;
|
private final RoboRallyWrapper roboRallyWrapper;
|
||||||
private TextField textInput;
|
private final TextField textInput;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new start menu screen
|
* Instantiates a new start menu screen
|
||||||
|
@ -209,7 +209,8 @@ class RoboRallyServerListener extends Listener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void disconnected(Connection connection) {
|
public void disconnected(Connection connection) {
|
||||||
if (deadPlayers.contains(connection) || !clients.keySet().contains(connection)) {
|
if (deadPlayers.contains(connection) || !clients.containsKey(connection) ||
|
||||||
|
!playerNames.containsKey(connection)) {
|
||||||
//Remove all traces of the player ever existing
|
//Remove all traces of the player ever existing
|
||||||
clients.remove(connection);
|
clients.remove(connection);
|
||||||
playerNames.remove(connection);
|
playerNames.remove(connection);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user