Fix exception with gas overlay rendering (#24001)

I had to rewrite this code for #23745 and forgot to test it. Damnit.
This commit is contained in:
Pieter-Jan Briers
2024-01-13 00:22:10 +01:00
committed by GitHub
parent 023d541063
commit fa56750d30

View File

@@ -70,7 +70,7 @@ namespace Content.Shared.Atmos
public bool MoveNext(out GasOverlayData gas)
{
while (_index < _tileData.Length)
while (++_index < _tileData.Length)
{
X += 1;
if (X >= ChunkSize)
@@ -79,7 +79,6 @@ namespace Content.Shared.Atmos
Y += 1;
}
_index += 1;
gas = _tileData[_index];
if (!gas.Equals(default))
return true;