]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix exception with gas overlay rendering (#24001)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Fri, 12 Jan 2024 23:22:10 +0000 (00:22 +0100)
committerGitHub <noreply@github.com>
Fri, 12 Jan 2024 23:22:10 +0000 (00:22 +0100)
I had to rewrite this code for #23745 and forgot to test it. Damnit.

Content.Shared/Atmos/GasOverlayChunk.cs

index b8299e8e227b21a4574a0121e89060dbcf2c2911..564ab72bfc391330826e67adbdb225244d67dcc0 100644 (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;