diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index d4283cdd3..5d63b200d 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -23,16 +23,13 @@ on: env: CI_DIR: 2049ef39-42a2-46d2-b513-ee6d2e3a7b15 RELEASES: | + windows:client:Windows/Client windows:server:Windows/Server + linux:client:Linux/Client linux:server:Linux/Server + mac:client:Mac/Client/Barotrauma.app/Contents/MacOS mac:server:Mac/Server - ARCHIVE_BASE_NAME: luacsforbarotraumaEP - - # windows:client:Windows/Client - # linux:client:Linux/Client - # mac:client:Mac/Client/Barotrauma.app/Contents/MacOS - # we do not currently provide a CL - + ARCHIVE_BASE_NAME: luacsforbarotrauma # XXX: these file names are subject to shell expansion. # Be careful when using special characters. ARCHIVE_FILES_SERVER: | @@ -214,4 +211,4 @@ jobs: files: | ${{ env.CI_DIR }}/archives/${{ env.ARCHIVE_BASE_NAME }}_{build,patch}_{windows,linux,mac}_{client,server}.zip ${{ env.CI_DIR }}/archives/${{ env.ARCHIVE_BASE_NAME }}_{build,patch}_linux_{client,server}.tar.gz - ${{ env.CI_DIR }}/archives/${{ env.ARCHIVE_BASE_NAME }}_refs.zip + ${{ env.CI_DIR }}/archives/${{ env.ARCHIVE_BASE_NAME }}_refs.zip \ No newline at end of file diff --git a/Barotrauma/BarotraumaShared/SharedSource/Map/MapEntity.cs b/Barotrauma/BarotraumaShared/SharedSource/Map/MapEntity.cs index 7ef1b529e..6b2a97d06 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Map/MapEntity.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Map/MapEntity.cs @@ -646,13 +646,17 @@ namespace Barotrauma var sw = new System.Diagnostics.Stopwatch(); sw.Start(); #endif - // Buffer lists to avoid repeated allocations var hullList = Hull.HullList.ToList(); var structureList = Structure.WallList.ToList(); var gapList = Gap.GapList.ToList(); var itemList = Item.ItemList.ToList(); + Parallel.ForEach(gapList, parallelOptions, gap => + { + gap.ResetWaterFlowThisFrame(); + }); + // First phase: parallel updates that have no order dependencies Parallel.Invoke(parallelOptions, () => @@ -674,10 +678,13 @@ namespace Barotrauma // Gap reset (must be done before update) () => { - Parallel.ForEach(gapList, parallelOptions, gap => + // Gap update (has order dependencies, keep random order but execute sequentially) + var shuffledGaps = gapList.OrderBy(g => Rand.Int(int.MaxValue)).ToList(); + foreach (var gap in shuffledGaps) { - gap.ResetWaterFlowThisFrame(); - }); + gap.Update(deltaTime, cam); + } + }, // Powered components update () => @@ -689,16 +696,6 @@ namespace Barotrauma #if CLIENT // Hull Cheats need to be executed after Hull update Hull.UpdateCheats(deltaTime, cam); -#endif - - // Gap update (has order dependencies, keep random order but execute sequentially) - var shuffledGaps = gapList.OrderBy(g => Rand.Int(int.MaxValue)).ToList(); - Parallel.ForEach(gapList, parallelOptions, gap => - { - gap.Update(deltaTime, cam); - }); - -#if CLIENT sw.Stop(); GameMain.PerformanceCounter.AddElapsedTicks("Update:MapEntity:Misc", sw.ElapsedTicks); sw.Restart(); diff --git a/Barotrauma/BarotraumaShared/SharedSource/Screens/GameScreen.cs b/Barotrauma/BarotraumaShared/SharedSource/Screens/GameScreen.cs index 7128946ac..c1a07a7d4 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Screens/GameScreen.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Screens/GameScreen.cs @@ -25,7 +25,7 @@ namespace Barotrauma private static readonly ParallelOptions parallelOptions = new ParallelOptions { - MaxDegreeOfParallelism = Environment.ProcessorCount * 2, + MaxDegreeOfParallelism = Environment.ProcessorCount > 0 ? Environment.ProcessorCount * 2 : 16, }; #if CLIENT diff --git a/README.md b/README.md index 0e6cfed9a..eba4ae19a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# LuaCsForBarotrauma Enhanced Performance Project +# LuaCsForBarotrauma Enhanced Performence Project > ⚠ **Warning:** This release is only available for server-side use and is not recommended to run on the client. Make sure that compatibility is adequately tested before deployment.