Fix decal system error (#10346)

This commit is contained in:
Leon Friedrich
2022-08-06 15:08:05 +12:00
committed by GitHub
parent 09aa2dd8c7
commit 064112a045
3 changed files with 8 additions and 17 deletions

View File

@@ -18,7 +18,6 @@ namespace Content.Server.Decals
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IAdminManager _adminManager = default!;
[Dependency] private readonly ITileDefinitionManager _tileDefMan = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly ChunkingSystem _chunking = default!;
private readonly Dictionary<EntityUid, HashSet<Vector2i>> _dirtyChunks = new();
@@ -405,7 +404,7 @@ namespace Content.Server.Decals
var chunksInRange = _chunking.GetChunksForSession(playerSession, ChunkSize, xformQuery, _chunkIndexPool, _chunkViewerPool);
var staleChunks = _chunkViewerPool.Get();
var previouslySent = _previousSentChunks[playerSession];
var previouslySent = _previousSentChunks.GetOrNew(playerSession);
// Get any chunks not in range anymore
// Then, remove them from previousSentChunks (for stuff like grids out of range)