mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 15:04:52 +09:00
Fix negative coordinates when drawing updated chunks
This commit is contained in:
1 parent
3bf7a84de4
commit
b70c7bd84f
1 file changed
+2
-2
@@ -290,8 +290,8 @@ export default function CanvasMinimapPage() {
|
||||
const tileKey = `${tileX},${tileY}`;
|
||||
|
||||
// Calculate position within the tile
|
||||
const localChunkX = chunkX % CHUNKS_PER_TILE;
|
||||
const localChunkY = chunkY % CHUNKS_PER_TILE;
|
||||
const localChunkX = ((chunkX % CHUNKS_PER_TILE) + CHUNKS_PER_TILE) % CHUNKS_PER_TILE;
|
||||
const localChunkY = ((chunkY % CHUNKS_PER_TILE) + CHUNKS_PER_TILE) % CHUNKS_PER_TILE;
|
||||
const pixelX = localChunkX * CHUNK_SIZE;
|
||||
const pixelY = localChunkY * CHUNK_SIZE;
|
||||
|
||||
|
||||
Reference in new issue
Block a user