Server Sync Loose item

This commit is contained in:
brausjonas
2023-04-11 14:58:28 +02:00
parent 9ed25cbf7e
commit b46b3aebe3
2 changed files with 32 additions and 16 deletions
+20 -16
View File
@@ -9,7 +9,10 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="6d89163f-4054-4765-8ee3-ac6da16b6997" name="Changes" comment="" /> <list default="true" id="6d89163f-4054-4765-8ee3-ac6da16b6997" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Room.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Room.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -33,22 +36,22 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent">{ <component name="PropertiesComponent"><![CDATA[{
&quot;keyToString&quot;: { "keyToString": {
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;, "RunOnceActivity.OpenProjectViewOnStart": "true",
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;, "RunOnceActivity.ShowReadmeOnStart": "true",
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;, "WebServerToolWindowFactoryState": "false",
&quot;last_opened_file_path&quot;: &quot;D:/Unity/flufflparty/flufflparty/Server&quot;, "last_opened_file_path": "/media/jonas/Data/Unity/flufflparty/Server",
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;, "node.js.detected.package.eslint": "true",
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;, "node.js.detected.package.tslint": "true",
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;, "node.js.selected.package.eslint": "(autodetect)",
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;, "node.js.selected.package.tslint": "(autodetect)",
&quot;project.structure.last.edited&quot;: &quot;Artifacts&quot;, "project.structure.last.edited": "Artifacts",
&quot;project.structure.proportion&quot;: &quot;0.0&quot;, "project.structure.proportion": "0.0",
&quot;project.structure.side.proportion&quot;: &quot;0.2&quot;, "project.structure.side.proportion": "0.2",
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot; "vue.rearranger.settings.migration": "true"
} }
}</component> }]]></component>
<component name="RunManager"> <component name="RunManager">
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> <configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="Main" /> <option name="MAIN_CLASS_NAME" value="Main" />
@@ -99,6 +102,7 @@
<workItem from="1680353695912" duration="624000" /> <workItem from="1680353695912" duration="624000" />
<workItem from="1680470998642" duration="1402000" /> <workItem from="1680470998642" duration="1402000" />
<workItem from="1681130452664" duration="6192000" /> <workItem from="1681130452664" duration="6192000" />
<workItem from="1681217780586" duration="94000" />
</task> </task>
<servers /> <servers />
</component> </component>
+12
View File
@@ -245,6 +245,18 @@ public class Room
} }
} }
break; break;
case 12:
for (int i = 0; i < players.length; i++)
{
//Sync to OTHER players
if (i != player)
{
//!!data processing!!
//------------------------------action---player-------item index--------free space--------
players[i].output.write(new byte[]{12, (byte)player, readData[1], 0, 0, 0, 0, 0, 0, 0});
}
}
break;
case 126: case 126:
server.deleteRoom(roomCode); server.deleteRoom(roomCode);
break; break;