feat: Ensure stone layer chunks always render and remain visible

This commit is contained in:
Kacper Kostka (aider)
2025-04-05 15:45:13 +02:00
parent 883c3d9a08
commit d87105baad
3 changed files with 19 additions and 4 deletions

View File

@@ -78,6 +78,15 @@ function simulationLoop(timestamp) {
// Update physics with timestamp for rate limiting
updatePhysics(timestamp);
// Force stone layer chunks to be rendered every frame
const visibleChunks = getVisibleChunks();
for (const { chunkX, chunkY, isVisible } of visibleChunks) {
if (isVisible && chunkY === 1) {
// Mark stone layer chunks as dirty to ensure they're always rendered
dirtyChunks.add(getChunkKey(chunkX, chunkY));
}
}
// Render
render();