diff --git a/TODO b/TODO index e916032ee..bef8eac7c 100644 --- a/TODO +++ b/TODO @@ -21,11 +21,6 @@ TODO • TODO: Blocks can be placed inside the player (check for AABB?) • TODO: Sometimes it’s possible to aim between two blocks and right-clicking will replace one -# Code improvements - -• TODO: If possible, `Cube` should inherit from `ItemWidget` or `Widget` -• TODO: Unify cube coords in `BlockCursor`, `Cube`, `ChunkBuilder` - # Refactorings • TODO: Add a mesh system, either here or in `GameKit` diff --git a/client/source/world/ChunkBuilder.cpp b/client/source/world/ChunkBuilder.cpp index d8b774c2c..a006f24d5 100644 --- a/client/source/world/ChunkBuilder.cpp +++ b/client/source/world/ChunkBuilder.cpp @@ -135,7 +135,8 @@ inline void ChunkBuilder::addFace(u8 x, u8 y, u8 z, u8 i, const ClientChunk &chu // Skip hidden faces if (surroundingBlock && surroundingBlock->id() && ((block->drawType() == BlockDrawType::Solid && surroundingBlock->drawType() == BlockDrawType::Solid && surroundingBlock->isOpaque()) - || (block->id() == surroundingBlock->id() && (block->drawType() == BlockDrawType::Liquid || block->drawType() == BlockDrawType::Glass)))) + || (block->id() == surroundingBlock->id() && (block->drawType() == BlockDrawType::Liquid || block->drawType() == BlockDrawType::Glass)) + || (block->drawType() == BlockDrawType::Liquid && surroundingBlock->drawType() == BlockDrawType::Solid))) return; static glm::vec3 a, b, c, v1, v2, normal; diff --git a/client/source/world/ClientChunk.cpp b/client/source/world/ClientChunk.cpp index 75f93925f..da14f42a5 100644 --- a/client/source/world/ClientChunk.cpp +++ b/client/source/world/ClientChunk.cpp @@ -38,7 +38,7 @@ void ClientChunk::drawLayer(gk::RenderTarget &target, gk::RenderStates states, u states.texture = &m_textureAtlas.texture(); - if (layer == ChunkBuilder::Layer::Flora) + if (layer == ChunkBuilder::Layer::Flora || (layer == ChunkBuilder::Layer::Liquid && areAllNeighboursInitialized())) glCheck(glDisable(GL_CULL_FACE)); else glCheck(glEnable(GL_CULL_FACE));