Skip to content

Commit e441ab9

Browse files
authoredFeb 19, 2021
Fix world-aligned node rendering at bottom (#10742)
1 parent b2ab5fd commit e441ab9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/client/mapblock_mesh.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ static void getNodeVertexDirs(const v3s16 &dir, v3s16 *vertex_dirs)
404404

405405
static void getNodeTextureCoords(v3f base, const v3f &scale, const v3s16 &dir, float *u, float *v)
406406
{
407-
if (dir.X > 0 || dir.Y > 0 || dir.Z < 0)
407+
if (dir.X > 0 || dir.Y != 0 || dir.Z < 0)
408408
base -= scale;
409409
if (dir == v3s16(0,0,1)) {
410410
*u = -base.X - 1;
@@ -422,8 +422,8 @@ static void getNodeTextureCoords(v3f base, const v3f &scale, const v3s16 &dir, f
422422
*u = base.X + 1;
423423
*v = -base.Z - 2;
424424
} else if (dir == v3s16(0,-1,0)) {
425-
*u = base.X;
426-
*v = base.Z;
425+
*u = base.X + 1;
426+
*v = base.Z + 1;
427427
}
428428
}
429429

0 commit comments

Comments
 (0)
Please sign in to comment.