From: Pieter-Jan Briers Date: Fri, 12 Jan 2024 23:22:10 +0000 (+0100) Subject: Fix exception with gas overlay rendering (#24001) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=fa56750d30571514e5607cb73c8edcf951e229f7;p=space-station-14.git Fix exception with gas overlay rendering (#24001) I had to rewrite this code for #23745 and forgot to test it. Damnit. --- 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;