diff --git a/Content.Shared/Decals/DecalGridChunkCollectionTypeSerializer.cs b/Content.Shared/Decals/DecalGridChunkCollectionTypeSerializer.cs index bd48a93e92..fe27df0866 100644 --- a/Content.Shared/Decals/DecalGridChunkCollectionTypeSerializer.cs +++ b/Content.Shared/Decals/DecalGridChunkCollectionTypeSerializer.cs @@ -133,7 +133,6 @@ namespace Content.Shared.Decals } } - var lookupIndex = 0; var lookupNodes = lookup.Keys.ToList(); lookupNodes.Sort(); @@ -223,6 +222,16 @@ namespace Content.Shared.Decals if (idComparison != 0) return idComparison; + var colorComparison = string.Compare(Color?.ToHex(), other.Color?.ToHex(), StringComparison.Ordinal); + + if (colorComparison != 0) + return colorComparison; + + var angleComparison = Angle.Theta.CompareTo(other.Angle.Theta); + + if (angleComparison != 0) + return angleComparison; + var zIndexComparison = ZIndex.CompareTo(other.ZIndex); if (zIndexComparison != 0) return zIndexComparison;