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.
This commit is contained in:
Eero
2025-12-28 17:45:51 +08:00
parent 1db14631df
commit bd1e624eb1
3 changed files with 26 additions and 72 deletions
@@ -147,7 +147,6 @@ namespace Barotrauma
CreationStackTrace += $"{fileName}@{fileLineNumber}; ";
}
#endif
#warning TODO: consider removing this mutex, entity creation probably shouldn't be multithreaded
lock (creationCounterMutex)
{
CreationIndex = creationCounter;