Fix issue with AVX

This commit is contained in:
GabsPuNs
2026-05-17 02:43:43 -04:00
parent 796c3101a9
commit f07f30b9f2

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();