Remove byte[] allocations for GasTileOverlaySystem.UpdateChunkTile (#12617)

This commit is contained in:
DrSmugleaf
2022-11-16 08:27:49 +01:00
committed by GitHub
parent 0350f635d1
commit f92f288047
4 changed files with 62 additions and 47 deletions

View File

@@ -63,10 +63,16 @@ namespace Content.Shared.Atmos.EntitySystems
if (FireState != other.FireState)
return false;
for (var i = 0; i < Opacity.Length; i++)
if (Opacity?.Length != other.Opacity?.Length)
return false;
if (Opacity != null && other.Opacity != null)
{
if (Opacity[i] != other.Opacity[i])
return false;
for (var i = 0; i < Opacity.Length; i++)
{
if (Opacity[i] != other.Opacity[i])
return false;
}
}
return true;