summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/content_mapblock.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/content_mapblock.cpp b/src/client/content_mapblock.cpp
index 947793ed0..b13ae86f4 100644
--- a/src/client/content_mapblock.cpp
+++ b/src/client/content_mapblock.cpp
@@ -373,6 +373,10 @@ void MapblockMeshGenerator::drawAutoLightedCuboid(aabb3f box, const f32 *txc,
f32 dx2 = box.MaxEdge.X;
f32 dy2 = box.MaxEdge.Y;
f32 dz2 = box.MaxEdge.Z;
+
+ box.MinEdge += origin;
+ box.MaxEdge += origin;
+
if (scale) {
if (!txc) { // generate texture coords before scaling
generateCuboidTextureCoords(box, texture_coord_buf);
@@ -385,8 +389,7 @@ void MapblockMeshGenerator::drawAutoLightedCuboid(aabb3f box, const f32 *txc,
generateCuboidTextureCoords(box, texture_coord_buf);
txc = texture_coord_buf;
}
- box.MinEdge += origin;
- box.MaxEdge += origin;
+
if (!tiles) {
tiles = &tile;
tile_count = 1;