Skip to content

Commit

Permalink
Fix exception with gas overlay rendering (space-wizards#24001)
Browse files Browse the repository at this point in the history
I had to rewrite this code for space-wizards#23745 and forgot to test it. Damnit.
  • Loading branch information
PJB3005 committed Jan 12, 2024
1 parent 023d541 commit fa56750
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Content.Shared/Atmos/GasOverlayChunk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public GasChunkEnumerator(GasOverlayChunk chunk)

public bool MoveNext(out GasOverlayData gas)
{
while (_index < _tileData.Length)
while (++_index < _tileData.Length)
{
X += 1;
if (X >= ChunkSize)
Expand All @@ -79,7 +79,6 @@ public bool MoveNext(out GasOverlayData gas)
Y += 1;
}

_index += 1;
gas = _tileData[_index];
if (!gas.Equals(default))
return true;
Expand Down

0 comments on commit fa56750

Please sign in to comment.