fix: jump fails in certain cases

This commit is contained in:
2026-03-14 18:00:02 +08:00
parent cf423c7db4
commit 7012e5f9fe
4 changed files with 6 additions and 5 deletions

View File

@@ -75,7 +75,7 @@ const std::vector<Vertex>& Chunk::get_vertex_data() const{
void Chunk::init_chunk() {
m_blocks.assign(CHUCK_SIZE * CHUCK_SIZE * CHUCK_SIZE, 0);
for (int x = 0; x < CHUCK_SIZE; x++) {
for (int y = 0; y < 2; y++) {
for (int y = 0; y < 5; y++) {
for (int z = 0; z < CHUCK_SIZE; z++) {
m_blocks[get_index(x, y, z)] = 1;
}