CBT2.0.1 Fix event reset and temp cell clearing logic
Changed ResetReceivedEvents from partial to regular method in EntitySpawner to ensure proper event queue clearing. Updated Level.cs to clear tempCellsLocal instead of tempCells, addressing potential issues with thread-local storage.
This commit is contained in:
@@ -23,7 +23,7 @@ namespace Barotrauma
|
||||
/// <summary>
|
||||
/// Clears all received events from the queue.
|
||||
/// </summary>
|
||||
partial void ResetReceivedEvents()
|
||||
void ResetReceivedEvents()
|
||||
{
|
||||
while (receivedEventsQueue.TryDequeue(out _)) { }
|
||||
}
|
||||
|
||||
@@ -5189,7 +5189,7 @@ namespace Barotrauma
|
||||
UnsyncedExtraWalls = null;
|
||||
}
|
||||
|
||||
tempCells?.Clear();
|
||||
tempCellsLocal?.Value?.Clear();
|
||||
cells = null;
|
||||
cellGrid = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user