Skip to content

Commit

Permalink
Fix world-aligned node rendering at bottom (#10742)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wuzzy2 committed Feb 19, 2021
1 parent b2ab5fd commit e441ab9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client/mapblock_mesh.cpp
Expand Up @@ -404,7 +404,7 @@ static void getNodeVertexDirs(const v3s16 &dir, v3s16 *vertex_dirs)

static void getNodeTextureCoords(v3f base, const v3f &scale, const v3s16 &dir, float *u, float *v)
{
if (dir.X > 0 || dir.Y > 0 || dir.Z < 0)
if (dir.X > 0 || dir.Y != 0 || dir.Z < 0)
base -= scale;
if (dir == v3s16(0,0,1)) {
*u = -base.X - 1;
Expand All @@ -422,8 +422,8 @@ static void getNodeTextureCoords(v3f base, const v3f &scale, const v3s16 &dir, f
*u = base.X + 1;
*v = -base.Z - 2;
} else if (dir == v3s16(0,-1,0)) {
*u = base.X;
*v = base.Z;
*u = base.X + 1;
*v = base.Z + 1;
}
}

Expand Down

0 comments on commit e441ab9

Please sign in to comment.