- Don't send stale chunks for deleted grid as client just errors it anyway.
- Store some allocations in fields.
This commit is contained in:
metalgearsloth
2023-11-22 15:35:57 +11:00
committed by GitHub
parent ee3e3583bd
commit 985da52191
2 changed files with 16 additions and 12 deletions

View File

@@ -454,9 +454,7 @@ namespace Content.Server.Decals
previouslySent.Remove(netGrid);
// Was the grid deleted?
if (!TryGetEntity(netGrid, out var gridId) || !MapManager.IsGrid(gridId.Value))
staleChunks[netGrid] = oldIndices;
else
if (TryGetEntity(netGrid, out var gridId) && !MapManager.IsGrid(gridId.Value))
{
// If grid was deleted then don't worry about telling the client to delete the chunk.
oldIndices.Clear();