mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com> Co-authored-by: Paul <ritter.paul1@googlemail.com>
24 lines
611 B
C#
24 lines
611 B
C#
using Robust.Shared.Map.Components;
|
|
using Robust.Shared.Timing;
|
|
|
|
namespace Robust.Shared.Map;
|
|
|
|
internal interface INetworkedMapManager : IMapManagerInternal
|
|
{
|
|
void CullDeletionHistory(GameTick upToTick);
|
|
}
|
|
|
|
internal sealed class NetworkedMapManager : MapManager, INetworkedMapManager
|
|
{
|
|
public void CullDeletionHistory(GameTick upToTick)
|
|
{
|
|
var query = EntityManager.AllEntityQueryEnumerator<MapGridComponent>();
|
|
|
|
while (query.MoveNext(out var grid))
|
|
{
|
|
var chunks = grid.ChunkDeletionHistory;
|
|
chunks.RemoveAll(t => t.tick < upToTick);
|
|
}
|
|
}
|
|
}
|