Commit Graph

178 Commits

Author SHA1 Message Date
Eero 7b8275100d Improve thread safety and performance in core systems
Refactors event, entity, and physics management to use thread-safe and lock-free data structures (Immutable collections, ConcurrentQueue, ConcurrentDictionary, Channel) for improved concurrency and performance. Replaces O(n) queue lookups with O(1) set/dictionary checks, ensures atomic updates for shared state, and optimizes queue draining and deferred action processing. Updates related code to use new APIs and patterns, and adds documentation for thread safety and workflow.
2025-12-29 16:47:10 +08:00
Eero c5fa49405f WIP Make networking code thread-safe and refactor update ID
Replaces direct increments of LastClientListUpdateID with a thread-safe IncrementLastClientListUpdateID method and uses Interlocked for atomic operations. Refactors EntitySpawner to lock access to the spawn/remove queue for thread safety. Updates INetSerializableStruct to use concurrent collections for cached variables and type behaviors, improving thread safety in networking code.
2025-12-28 13:10:17 +08:00
NotAlwaysTrue 1def7b7b8d add catch code for previous commit :( 2025-12-22 22:54:33 +08:00
NotAlwaysTrue dadd6c598f try-finally multiple UniqueEvents.ToList() to avoid issues(Destination array was not long enough. Check the destination index, length, and the array's lower bounds) 2025-12-22 22:43:02 +08:00
NotAlwaysTrue bab02fca8a Tried to fix all errors realted to UniqueEvent and Events(Collection was modified) 2025-12-22 17:16:49 +08:00
Evil Factory 352625af28 Merge remote-tracking branch 'upstream/master' 2025-12-08 12:35:44 -03:00
Markus Isberg 598966f200 Release 1.11.4.1 (Winter Update) 2025-12-08 14:56:47 +00:00
Evil Factory 0d223636f6 Merge branch 'master' of https://github.com/regalis11/Barotrauma 2025-10-22 10:55:51 -03:00
Regalis11 7e25111487 Release 1.10.7.2 - Autumn Update 2025 Hotfix 4 2025-10-22 14:54:03 +03:00
Evil Factory e902ba673d Merge remote-tracking branch 'upstream/master' 2025-10-02 08:12:37 -03:00
Regalis11 6c1b18a56d Release 1.10.7.0 - Autumn Update 2025 Hotfix 2 2025-10-02 12:31:41 +03:00
Evil Factory da13162c60 Merge branch 'master' of https://github.com/Regalis11/Barotrauma 2025-09-25 09:00:20 -03:00
Regalis11 b2d91cde7c Release 1.10.6.0 - Autumn Update 2025 Hotfix 1 2025-09-25 11:11:35 +03:00
Evil Factory cfab935b75 Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop 2025-09-17 08:30:35 -03:00
Regalis11 caa0326cf8 Release 1.10.5.0 - Autumn Update 2025 2025-09-17 13:44:21 +03:00
EvilFactory 2368640841 Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop 2025-06-17 15:45:16 -03:00
Regalis11 ea5a2bc693 Release 1.9.7.0 - Summer Update 2025 2025-06-17 16:38:11 +03:00
EvilFactory 64faf5c967 Merge branch 'master' of https://github.com/Regalis11/Barotrauma 2025-04-29 07:27:36 -03:00
Regalis11 ec9e29af07 Release 1.8.8.1 - Calm Before the Storm Hotfix 1 2025-04-29 12:46:51 +03:00
EvilFactory 103871a4e9 Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop 2025-04-10 10:37:09 -03:00
Markus Isberg a4a3427e4e Unstable 1.8.4.0 2025-03-12 12:56:27 +00:00
EvilFactory 6da26ffa93 Merge remote-tracking branch 'upstream/master' into develop 2024-12-11 10:44:53 -03:00
Regalis11 f6349b2175 v1.7.7.0 (Winter Update 2024) 2024-12-11 13:26:13 +02:00
EvilFactory 9e9ac6cd32 Merge remote-tracking branch 'upstream/master' into develop 2024-10-31 06:31:11 -03:00
Regalis11 26ffd2104e v1.6.19.1 (Unto the Breach Hotfix 1) 2024-10-31 11:27:32 +02:00
EvilFactory d906066425 Merge remote-tracking branch 'upstream/master' into develop 2024-10-28 10:10:02 -03:00
Regalis11 7eac44ea7d v1.6.18.1 (Unto the Breach Hotfix 1) 2024-10-28 15:03:46 +02:00
EvilFactory 30a8f0c561 Merge remote-tracking branch 'upstream/master' into develop 2024-10-22 12:42:35 -03:00
Regalis11 6e6c17e100 v1.6.17.0 (Unto the Breach update) 2024-10-22 17:29:04 +03:00
EvilFactory 55e97a8baa Merge remote-tracking branch 'upstream/master' into develop 2024-06-27 10:52:55 -03:00
Regalis11 4f556236b8 v1.5.9.1 (Summer Update Hotfix 2) 2024-06-27 16:46:33 +03:00
EvilFactory e163f7ed73 Merge remote-tracking branch 'upstream/master' into develop 2024-06-18 12:19:13 -03:00
Regalis11 230d1b6e78 v1.5.7.0 (Summer Update) 2024-06-18 16:50:02 +03:00
EvilFactory 0a9ff43986 Merge remote-tracking branch 'upstream/master' into develop 2024-04-24 12:20:11 -03:00
Regalis11 ff1b8951a7 v1.4.4.1 (Blood in the Water Update) 2024-04-24 18:09:05 +03:00
EvilFactory 7a74cd052f Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop 2024-03-28 14:26:18 -03:00
Regalis11 3791670c42 v1.3.0.1 (Epic Store release) 2024-03-28 18:34:33 +02:00
EvilFactory 448e4cdfbb Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop 2023-12-14 11:56:39 -03:00
Regalis11 b91e85559d v1.2.6.0 (Winter Update) 2023-12-14 16:11:27 +02:00
EvilFactory 759f66cf9f Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop 2023-10-30 12:40:09 -03:00
Regalis11 a8f9c97dda v1.1.19.3 (Treacherous Tides Hotfix 2) 2023-10-30 17:38:29 +02:00
EvilFactory 39005ca32c Fixed inverted check in override traitors 2023-10-19 16:30:47 -03:00
EvilFactory b5d89c8c7b Fixed roundEnd not being called on the server 2023-10-19 15:27:17 -03:00
EvilFactory 9838cc59ee Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop 2023-10-19 12:18:30 -03:00
Markus Isberg cf8f0de659 Unstable 1.1.14.0 2023-10-02 16:43:54 +03:00
EvilFactory 15daa64f66 Merge https://github.com/Regalis11/Barotrauma into develop 2023-06-15 12:13:50 -03:00
itchyOwl 83de72e3d2 v1.0.20.1 (summer patch) 2023-06-15 16:46:54 +03:00
EvilFactory 2c45c3d020 Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop 2023-05-10 11:55:46 -03:00
Regalis11 ee1db852b1 v1.0.13.1 (first post-1.0 patch) 2023-05-10 15:07:17 +03:00
EvilFactory 4a229c6427 Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop 2023-03-13 13:32:14 -03:00