From fa56750d30571514e5607cb73c8edcf951e229f7 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Sat, 13 Jan 2024 00:22:10 +0100 Subject: [PATCH] Fix exception with gas overlay rendering (#24001) I had to rewrite this code for #23745 and forgot to test it. Damnit. --- Content.Shared/Atmos/GasOverlayChunk.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Content.Shared/Atmos/GasOverlayChunk.cs b/Content.Shared/Atmos/GasOverlayChunk.cs index b8299e8e22..564ab72bfc 100644 --- a/Content.Shared/Atmos/GasOverlayChunk.cs +++ b/Content.Shared/Atmos/GasOverlayChunk.cs @@ -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;