fix: Resolve duplicate identifier by renaming chunkY
to floorChunkY
This commit is contained in:
parent
9cdf7eba78
commit
3f4f8bc09c
@ -340,8 +340,8 @@ function setPixel(worldX, worldY, type) {
|
|||||||
|
|
||||||
function getPixel(worldX, worldY) {
|
function getPixel(worldX, worldY) {
|
||||||
// Special case: floor at the bottom of the world (first two chunks)
|
// Special case: floor at the bottom of the world (first two chunks)
|
||||||
const chunkY = Math.floor(worldY / CHUNK_SIZE);
|
const floorChunkY = Math.floor(worldY / CHUNK_SIZE);
|
||||||
if (worldY % CHUNK_SIZE === CHUNK_SIZE - 1 && (chunkY === 0 || chunkY === 1)) {
|
if (worldY % CHUNK_SIZE === CHUNK_SIZE - 1 && (floorChunkY === 0 || floorChunkY === 1)) {
|
||||||
return WALL;
|
return WALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user