Smooth Camera and Room Exist check
This commit is contained in:
Generated
+15
-14
@@ -33,21 +33,21 @@
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"project.structure.last.edited": "Artifacts",
|
||||
"project.structure.proportion": "0.0",
|
||||
"project.structure.side.proportion": "0.2",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"project.structure.last.edited": "Artifacts",
|
||||
"project.structure.proportion": "0.0",
|
||||
"project.structure.side.proportion": "0.2",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}]]></component>
|
||||
}</component>
|
||||
<component name="RunManager">
|
||||
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="Main" />
|
||||
@@ -72,6 +72,7 @@
|
||||
<updated>1674839030210</updated>
|
||||
<workItem from="1674839031467" duration="221000" />
|
||||
<workItem from="1674839402490" duration="20380000" />
|
||||
<workItem from="1674897525328" duration="2102000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -111,6 +111,15 @@ public class Room
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
try
|
||||
{
|
||||
for (int i = 0; i < players.length; i++)
|
||||
{
|
||||
players[player].output.write(new byte[]{127, 0, 0, 0, 0, 0, 0, 0, 0, 0});
|
||||
}
|
||||
} catch (IOException ex)
|
||||
{
|
||||
}
|
||||
server.deleteRoom(roomCode);
|
||||
for(int i = 0; i < threads.size(); i++)
|
||||
{
|
||||
@@ -121,6 +130,15 @@ public class Room
|
||||
|
||||
} catch (IOException e)
|
||||
{
|
||||
try
|
||||
{
|
||||
for (int i = 0; i < players.length; i++)
|
||||
{
|
||||
players[player].output.write(new byte[]{127, 0, 0, 0, 0, 0, 0, 0, 0, 0});
|
||||
}
|
||||
} catch (IOException ex)
|
||||
{
|
||||
}
|
||||
for(int i = 0; i < threads.size(); i++)
|
||||
{
|
||||
threads.get(i).stop();
|
||||
|
||||
+10
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user