Refactor MapEntity.UpdateAll for improved parallelism
Rewrites MapEntity.UpdateAll to use more granular parallelism, reducing contention and improving performance by parallelizing hull, structure, and gap resets, while keeping order-dependent and non-thread-safe updates sequential. Updates GameScreen to pass ParallelOptions to UpdateAll.
This commit is contained in:
@@ -273,11 +273,11 @@ namespace Barotrauma
|
||||
});
|
||||
|
||||
#if CLIENT
|
||||
MapEntity.UpdateAll((float)deltaTime, cam);
|
||||
MapEntity.UpdateAll((float)deltaTime, cam, parallelOptions);
|
||||
#elif SERVER
|
||||
|
||||
// TODO: Move both UpdateAll() method to this file
|
||||
MapEntity.UpdateAll((float)deltaTime, Camera.Instance);
|
||||
MapEntity.UpdateAll((float)deltaTime, Camera.Instance, parallelOptions);
|
||||
StatusEffect.UpdateAll((float)deltaTime);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user