This commit is contained in:
GabsPuNs
2026-05-14 21:52:21 -04:00
parent 1b2f5c6fe8
commit f8a2d644f5
291 changed files with 7363 additions and 18368 deletions

View File

@@ -718,28 +718,24 @@ void LevelRenderer::resortChunks(int xc, int yc, int zc)
_mm_store_si128((__m128i*)resMax, vYMax);
for(int i = 0; i < 4; i++)
{
if (resMin[i] < yMinChunk) yMinChunk = resMin[i];
if (resMax[i] > yMaxChunk) yMaxChunk = resMax[i];
if (resMin[i] < yMinChunk)
yMinChunk = resMin[i];
if (resMax[i] > yMaxChunk)
yMaxChunk = resMax[i];
}
}
#endif
for (int y = 0; y < yChunks; y++)
{
int yy = y * CHUNK_SIZE;
if (yy < yMinChunk) yMinChunk = yy;
if (yy > yMaxChunk) yMaxChunk = yy;
if (yy < yMinChunk)
yMinChunk = yy;
if (yy > yMaxChunk)
yMaxChunk = yy;
chunks[playerIndex][(z * yChunks + y) * xChunks + x].chunk->setPos(xx, yy, zz);
}
}
#endif
for (int y = 0; y < yChunks; y++)
{
int yy = y * CHUNK_SIZE;
if (yy < yMinChunk) yMinChunk = yy;
if (yy > yMaxChunk) yMaxChunk = yy;
Chunk *chunk = chunks[playerIndex][(z * yChunks + y) * xChunks + x].chunk;
chunk->setPos(xx, yy, zz);
}
}
}
nonStackDirtyChunksAdded();
@@ -873,7 +869,7 @@ int LevelRenderer::renderChunks(int from, int to, int layer, double alpha)
if( ( globalChunkFlags[pClipChunk->globalIdx] & emptyFlag ) == emptyFlag ) continue; // Check that this particular layer isn't empty
// List can be calculated directly from the chunk's global idex
int list = pClipChunk->globalIdx * 3 + layer;
int list = pClipChunk->globalIdx * 2 + layer;
list += chunkLists;
if(RenderManager.CBuffCall(list, first))
@@ -898,7 +894,7 @@ int LevelRenderer::renderChunks(int from, int to, int layer, double alpha)
if( !(globalChunkFlags[pClipChunk->globalIdx] & LevelRenderer::CHUNK_FLAG_CUT_OUT) ) continue; // Does this chunk contain any cut out geometry
// List can be calculated directly from the chunk's global idex
int list = pClipChunk->globalIdx * 3 + layer;
int list = pClipChunk->globalIdx * 2 + layer;
list += chunkLists;
if(RenderManager.CBuffCallCutOut(list, first))