Skip to content

Commit 9474f76

Browse files
committed
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.
1 parent 854d7be commit 9474f76

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Barotrauma/BarotraumaClient/ClientSource/Networking/EntitySpawner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ partial class EntitySpawner : Entity, IServerSerializable
2323
/// <summary>
2424
/// Clears all received events from the queue.
2525
/// </summary>
26-
partial void ResetReceivedEvents()
26+
void ResetReceivedEvents()
2727
{
2828
while (receivedEventsQueue.TryDequeue(out _)) { }
2929
}

Barotrauma/BarotraumaShared/SharedSource/Map/Levels/Level.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5189,7 +5189,7 @@ public override void Remove()
51895189
UnsyncedExtraWalls = null;
51905190
}
51915191

5192-
tempCells?.Clear();
5192+
tempCellsLocal?.Value?.Clear();
51935193
cells = null;
51945194
cellGrid = null;
51955195

0 commit comments

Comments
 (0)