Fix GastTileOverlay sending redundant data (#26623)
Fix GastTileOverlay not updating properly
This commit is contained in:
@@ -432,13 +432,15 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
if (!overlay.Chunks.TryGetValue(gIndex, out var value))
|
if (!overlay.Chunks.TryGetValue(gIndex, out var value))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (previousChunks != null &&
|
// If the chunk was updated since we last sent it, send it again
|
||||||
previousChunks.Contains(gIndex) &&
|
if (value.LastUpdate > LastSessionUpdate)
|
||||||
value.LastUpdate > LastSessionUpdate)
|
|
||||||
{
|
{
|
||||||
|
dataToSend.Add(value);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Always send it if we didn't previously send it
|
||||||
|
if (previousChunks == null || !previousChunks.Contains(gIndex))
|
||||||
dataToSend.Add(value);
|
dataToSend.Add(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user