Smooth Camera and Room Exist check

This commit is contained in:
brausjonas
2023-01-28 11:32:12 +01:00
parent cf9a17a8ff
commit fc84f233ec
18 changed files with 172 additions and 83 deletions
+10 -2
View File
@@ -64,9 +64,17 @@ public class Server
input.read(readData);
String roomCode = new String(readData, StandardCharsets.US_ASCII);
Client client1 = new Client(output, input, client);
rooms.get(roomCode).addClient(client1);
if(rooms.containsKey(roomCode))
{
Client client1 = new Client(output, input, client);
rooms.get(roomCode).addClient(client1);
}
else
{
output.write(new byte[]{127, 0, 0, 0, 0, 0, 0, 0, 0, 0});
}
break;
}