This commit is contained in:
Anuken
2025-06-02 14:30:19 -04:00
parent f924d0b533
commit fbc2794fde
2 changed files with 3 additions and 4 deletions

View File

@@ -119,8 +119,7 @@ public final class FogControl implements CustomChunk{
var data = data(team);
if(data == null) return false;
if(x < 0 || y < 0 || x >= ww || y >= wh) return false;
return data.read.get(x + y * ww);
return data.read.get(Mathf.clamp(x, 0, ww - 1) + Mathf.clamp(y, 0, wh - 1) * ww);
}
public void resetFog(){