Commit Graph

5988 Commits

Author SHA1 Message Date
NotAlwaysTrue
740ace88f0 OBT/1.0.15
* Removed PF support again
Fixed Object reference not set to an instance of an object exception in EnemyAIController.cs UpdateLimbAttack()

* Reverted pervious fix on EnemyAIController bcuz the fix will not fix anything
Reduced MaxDegreeOfParallelism by 1 bcuz already a task there

* Re-removed all PF related stuff to fix issue
Removed all RUN_PHYSICS_IN_SEPARATE_THREAD related code because these codes are no longer functional
Removed a duplicated loop in GameScreen
Removed mulitple unnessary parallel operations

* Potentially fixed #44 and #43

* added a ToList for Gap.GapList
2026-02-09 15:34:07 +08:00
NotAlwaysTrue
8bfe8a2c37 OBT/1.0.14
Fixed parallelism count issue
Added SingleThreadWorker to handle single-thread related works
Fixed incorrect order when updating gaps
Potentially Fixed #39
2026-01-08 12:40:30 +08:00
NotAlwaysTrue
f3c22315a1 OBT/1.0.13
Fixed another crash(Object reference not set to an instance of an object.)
2026-01-02 18:34:12 +08:00
NotAlwaysTrue
59da9211f6 OBT/1.0.2 (#35)
* Fixed? the cause of gap crashes. May require further monitor and check :(

* Fixed a bug that will cause the server stop responding

* Fixed (?) an issue causing a SetPosition() will crash the game
Removed CL release, Added manual dispatcher inputs
2026-01-01 14:14:40 +08:00
NotAlwaysTrue
82d26b5bb8 OBT/1.0.11
Fixed a bug that caused the server to stop responding
Fixed an issue in gap.Update that may cause the server to crash
2025-12-30 17:41:50 +08:00
NotAlwaysTrue
4c151a4cf1 OBT/1.0.10
Reverted a fixed bug that caused a rare crash but the fix itself will do impact on server performance
2025-12-29 22:52:29 +08:00
NotAlwaysTrue
85b71f1dd6 Revert a change made in 1.0.9 due to large-scale performence impact.
Note : This may cause server crash
2025-12-29 22:36:38 +08:00
NotAlwaysTrue
24484496d2 OBT/1.0.9
Fixed an issue causing gap.update crashes the game(engine issue)
Fixed an potential issue that on MacOS we cannot get core count and cause MaxDegreeOfParallelism will be set to 0. Now if we cant get that number we simply use a fixed 16 instead
2025-12-29 16:33:37 +08:00
NotAlwaysTrue
190c98d8f2 Fixed 2 issues
Fixed an issue causing gap.update crashes the game(engine issue)
Fixed an potential issue that on MacOS we cannot get core count and cause MaxDegreeOfParallelism will be set to 0. Now if we cant get that number we simply use a fixed 16 instead
2025-12-29 16:28:34 +08:00
Eero
046483b9da Revert "OBT1.1.0 Merge branch 'dev_pte' into dev"
This reverts commit 177cf89756, reversing
changes made to 42ba733cd4.
2025-12-29 11:18:11 +08:00
Eero
177cf89756 OBT1.1.0 Merge branch 'dev_pte' into dev 2025-12-29 11:15:41 +08:00
Eero
e167a34f32 Make entity lists thread-safe with copy-on-write wrappers
Replaced static entity lists (e.g., HullList, GapList, MapEntityList, etc.) with thread-safe copy-on-write wrappers to improve concurrency and prevent race conditions. Updated usages and related methods to support the new thread-safe collections, ensuring atomic operations and lock-free reads throughout the codebase.
2025-12-28 21:59:03 +08:00
Eero
bd1e624eb1 Remove unnecessary thread-safety code from entity spawning
Eliminated redundant locks and related comments in EntitySpawner and Entity classes, simplifying the spawn and remove queue handling. Also removed outdated comments in GameScreen regarding thread safety. These changes assume entity spawning and removal are no longer performed from multiple threads, improving code clarity and maintainability.
2025-12-28 17:45:51 +08:00
Eero
1db14631df Defer physics transforms to ensure thread safety
Refactored multiple components to defer Farseer physics transform operations using PhysicsBodyQueue, preventing unsafe calls from parallel contexts. This change addresses thread safety issues with Farseer's DynamicTree and ensures transforms are executed in a safe context. Also increased the spawn amount limit in DebugConsole from 100 to 100000.
2025-12-28 17:14:16 +08:00
Eero
59bf2749dd Improve thread safety in sound and physics systems
Refactored SoundChannel and SoundManager to use explicit locking for OpenAL operations and channel assignment, preventing race conditions during parallel sound playback. Added thread-local stacks in DynamicTree to ensure thread safety during parallel physics queries and raycasts. These changes address concurrency issues when sounds or physics queries are triggered from multiple threads.
2025-12-28 16:18:49 +08:00
Eero
ad0bcddaa4 CL_Fix Use TryAdd when adding afflictions to dictionary
Replaces afflictions.Add with afflictions.TryAdd to prevent exceptions if the affliction already exists in the dictionary.
2025-12-28 15:11:56 +08:00
Eero
f485583621 Unstable 0.2 Defer physics operations during parallel updates
Introduces a thread-safe queue for deferring physics operations (such as body creation and transforms) to the main thread, ensuring Farseer Physics is not accessed from parallel contexts. Updates Holdable, Item, MapEntity, and GameScreen to use the new PhysicsBodyQueue for safe physics operations during parallel updates, and refactors PhysicsBodyQueue to support general deferred physics actions.
2025-12-28 15:10:06 +08:00
Eero
49355fe32b Unstable Add thread-safe queue for deferred physics body creation
Introduces PhysicsBodyQueue to safely defer physics body creation to the main thread, addressing thread-safety issues with Farseer Physics during parallel updates. Updates LevelResource, TriggerComponent, BallastFloraBehavior, and MapEntity to use the queue for all physics body creation and refresh operations, ensuring they are processed outside of parallel loops. Also adds cleanup of the queue at round end.
2025-12-28 14:42:17 +08:00
NotAlwaysTrue
356ae6cf74 OBT/1.0.8
Fixed an mod conflict due to execute order
2025-12-28 14:36:09 +08:00
NotAlwaysTrue
770f76a658 Fixed a potential conflict with mods 2025-12-28 14:21:32 +08:00
NotAlwaysTrue
42ba733cd4 Fixed a potential conflict with mods 2025-12-28 14:17:01 +08:00
Eero
45312af297 WIP Make static collections thread-safe using ThreadStatic and ThreadLocal
Refactored various static and instance collections to use [ThreadStatic], ThreadLocal, or local variables to prevent concurrent modification issues during parallel updates. This affects status effect targets, affliction lists, damage modifiers, and cached data in Character, CharacterHealth, Limb, Explosion, Hull, Submarine, and ToolBox classes. Also replaced Dictionary caches with ConcurrentDictionary where appropriate for thread safety.
2025-12-28 14:14:53 +08:00
NotAlwaysTrue
baee73e132 OBT/1.0.7
Fixed #7
Fixed #22/#25
Fixed a potential cause to teleport/etc stuff
Added a Client counter in PM
Fixed typo
2025-12-28 14:01:44 +08:00
NotAlwaysTrue
279f40c82e Merge branch 'master' into master-1.0.6 2025-12-28 14:00:03 +08:00
NotAlwaysTrue
aaf0763e09 Removed a potential issue 2025-12-28 13:54:29 +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
3d96e4adb6 Fixed #22 2025-12-28 13:05:56 +08:00
NotAlwaysTrue
42af6f2ec0 Fixed #22 2025-12-28 13:02:31 +08:00
Eero
31812d524d Make collections thread-safe for AI and character systems
Refactored various collections (lists, dictionaries, queues, and caches) in AI, character, animation, and item component systems to use thread-safe patterns and concurrent data structures. This includes introducing copy-on-write wrappers, ConcurrentDictionary, ConcurrentQueue, and ThreadLocal where appropriate to ensure safe concurrent access and mutation, improving stability in multi-threaded scenarios.
2025-12-28 12:53:10 +08:00
NotAlwaysTrue
21a2863a1a Fixed a typo using e instead of a :( 2025-12-28 11:45:55 +08:00
NotAlwaysTrue
bd643503b3 Added ClientCount for PerformenceMonitor
Add a marker to help distinguish EP from other SV Executables
Fixed a "Failed to copy object. Source is null." introduced by last update
Uses dynamic ThreadCount instead of fixed 16
Re-Removed most PF support
Re-Parallelzed Level update and Character Update(a conflict warning will be issued
2025-12-28 11:45:21 +08:00
NotAlwaysTrue
51a1fb1235 Re-applied multiple fixs 2025-12-28 11:43:49 +08:00
NotAlwaysTrue
8f0eec7031 Fixed #7 (re-applied) 2025-12-28 11:43:15 +08:00
Evil Factory
6dd36a1575 Fix memory leak that happens when you press retry in singleplayer 2025-12-28 11:42:03 +08:00
Eero
46595b1399 WIP Make collections thread-safe and add safe iteration
Replaced static lists and dictionaries with thread-safe ConcurrentDictionary or ThreadLocal collections for various item components and systems. Updated all relevant code to use snapshots (ToArray, ToList) for safe iteration, and added helper methods for marking and clearing changed connections. These changes improve thread safety and prevent potential concurrency issues in multi-threaded scenarios.
2025-12-28 04:59:56 +08:00
Eero
90962b2328 Refactor Item collections for thread safety and performance
Replaces static Item.ItemList and related collections with thread-safe data structures using ConcurrentDictionary and ImmutableHashSet. Adds thread-safe helpers for marking items for deconstruction and managing item lists. Updates all usages of Item.ItemList and DeconstructItems to use new APIs, improving performance and safety in multi-threaded contexts. Also refactors MeleeWeapon and Projectile impact queues to use ConcurrentQueue, and updates related logic throughout the codebase.
2025-12-28 03:57:04 +08:00
NotAlwaysTrue
edd50ef181 Update publish-release.yml 2025-12-27 20:54:06 +08:00
NotAlwaysTrue
ced6dca7a3 OBT/1.0.6
Fixed a typo using "e" instead of "a" in word "performance"
2025-12-27 20:33:51 +08:00
NotAlwaysTrue
559aeb3c3f Fixed a typo using e instead of a :( 2025-12-27 18:47:50 +08:00
NotAlwaysTrue
16131e0acc Fixed a typo 2025-12-27 18:45:51 +08:00
NotAlwaysTrue
e8f377c20d Sync with Main
Sync with Main
2025-12-27 16:08:15 +08:00
NotAlwaysTrue
27896d53ef OBT/1.0.5
OBT/1.0.5
2025-12-27 16:06:23 +08:00
NotAlwaysTrue
a44d89f953 Revert "Revert back to 1.0.3" 2025-12-27 16:05:20 +08:00
NotAlwaysTrue
75465f2f21 OBT/1.0.5
Same as 1.0.4
Fixed a crash introduced by 1.0.4
2025-12-27 16:02:38 +08:00
NotAlwaysTrue
3aadff7a3c Improved thread safety for Gap.update() 2025-12-27 15:55:50 +08:00
NotAlwaysTrue
c65101537d Merge pull request #17 from NotAlwaysTrue/revert-16-master-fix
Revert back to 1.0.3
2025-12-27 15:35:07 +08:00
NotAlwaysTrue
b35eee5561 Revert "OBT/1.0.4" 2025-12-27 15:32:16 +08:00
NotAlwaysTrue
cdfe87c81b OBT/1.0.4
Add a marker to help distinguish EP from other SV Executables
Fixed a "Failed to copy object. Source is null." introduced by last update
Uses dynamic ThreadCount instead of fixed 16
Re-Removed most PF support
Re-Parallelzed Level update and Character Update(a conflict warning will be issued
2025-12-27 13:26:30 +08:00
NotAlwaysTrue
7e899d900a Added ClientCount for PerformenceMonitor
Add a marker to help distinguish EP from other SV Executables
Fixed a "Failed to copy object. Source is null." introduced by last update
Uses dynamic ThreadCount instead of fixed 16
Re-Removed most PF support
Re-Parallelzed Level update and Character Update(a conflict warning will be issued
2025-12-27 13:19:36 +08:00
NotAlwaysTrue
a037e616bf OBT/1.0.3
Restored multiple removed parallel stuff
Restored PF support(why)
Fixed #7
2025-12-27 02:12:25 +08:00