From d444b4de30bc04dd1e688121ae8a6fda91c612e8 Mon Sep 17 00:00:00 2001 From: Louis-CharlesG Date: Mon, 4 Dec 2023 16:17:59 -0500 Subject: [PATCH] Re-Changement des textures. --- SQCSim-common/chunk.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SQCSim-common/chunk.cpp b/SQCSim-common/chunk.cpp index fa361d6..9dc2482 100644 --- a/SQCSim-common/chunk.cpp +++ b/SQCSim-common/chunk.cpp @@ -35,14 +35,14 @@ Chunk::Chunk(unsigned int x, unsigned int y, int64_t seed) : m_posX(x), m_posY(y if (iy < 20) { //std::cout << "" << ynoiz << std::endl; - SetBlock(ix, iy, iz, BTYPE_GREENGRASS, nullptr); + SetBlock(ix, iy, iz, BTYPE_GRASS, nullptr); } else if (iy == 20 || iy == 21) { double fractionalPart = ynoiz - static_cast(ynoiz); if (iy == 20) { if (fractionalPart < 0.3) { - SetBlock(ix, iy, iz, BTYPE_GREENGRASS, nullptr); + SetBlock(ix, iy, iz, BTYPE_GRASS, nullptr); } else { SetBlock(ix, iy, iz, BTYPE_METAL, nullptr); @@ -50,7 +50,7 @@ Chunk::Chunk(unsigned int x, unsigned int y, int64_t seed) : m_posX(x), m_posY(y } else if (iy == 21) { if (fractionalPart < 0.6) { - SetBlock(ix, iy, iz, BTYPE_GREENGRASS, nullptr); + SetBlock(ix, iy, iz, BTYPE_GRASS, nullptr); } else { SetBlock(ix, iy, iz, BTYPE_METAL, nullptr); @@ -138,7 +138,7 @@ Chunk::Chunk(unsigned int x, unsigned int y, int64_t seed) : m_posX(x), m_posY(y height /= (CHUNK_SIZE_Y / 1.9); height += 15.; - if (GetBlock(ix, (int)height, iz) == BTYPE_GREENGRASS || (GetBlock(ix, (int)height, iz) == BTYPE_METAL)) { + if (GetBlock(ix, (int)height, iz) == BTYPE_DIRT || (GetBlock(ix, (int)height, iz) == BTYPE_METAL)) { valeurRnd = simplex.eval(xnoiz, ynoiz); int distanceThreshold = 20; @@ -222,7 +222,7 @@ Chunk::Chunk(unsigned int x, unsigned int y, int64_t seed) : m_posX(x), m_posY(y void Chunk::PlaceTree(int x, int y, int z, int height) { for (int iy = 0; iy < height + 1; ++iy) { - SetBlock(x, y + iy, z, BTYPE_GRASS, nullptr); + SetBlock(x, y + iy, z, BTYPE_DIRT, nullptr); } int foliageHeight = height / 2; @@ -231,7 +231,7 @@ void Chunk::PlaceTree(int x, int y, int z, int height) { for (int dx = -3; dx <= 3; ++dx) { for (int dz = -3; dz <= 3; ++dz) { if (dx * dx + dy * dy + dz * dz < 10) { - SetBlock(x + dx, y + height + dy, z + dz, BTYPE_DIRT, nullptr); + SetBlock(x + dx, y + height + dy, z + dz, BTYPE_GREENGRASS, nullptr); } } }