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:
Eero
2025-12-29 18:37:13 +08:00
parent 854d7bea1f
commit 9474f7654c
2 changed files with 2 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ namespace Barotrauma
/// <summary>
/// Clears all received events from the queue.
/// </summary>
partial void ResetReceivedEvents()
void ResetReceivedEvents()
{
while (receivedEventsQueue.TryDequeue(out _)) { }
}

View File

@@ -5189,7 +5189,7 @@ namespace Barotrauma
UnsyncedExtraWalls = null;
}
tempCells?.Clear();
tempCellsLocal?.Value?.Clear();
cells = null;
cellGrid = null;