Skip to content

Commit

Permalink
Fix scaled world-aligned textures being aligned inconsistently for no…
Browse files Browse the repository at this point in the history
…n-normal drawtypes
  • Loading branch information
Wuzzy2 committed Aug 19, 2021
1 parent 24b66de commit 1320c51
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/client/mapblock_mesh.cpp
Expand Up @@ -407,20 +407,20 @@ static void getNodeTextureCoords(v3f base, const v3f &scale, const v3s16 &dir, f
if (dir.X > 0 || dir.Y != 0 || dir.Z < 0)
base -= scale;
if (dir == v3s16(0,0,1)) {
*u = -base.X - 1;
*v = -base.Y - 1;
*u = -base.X;
*v = -base.Y;
} else if (dir == v3s16(0,0,-1)) {
*u = base.X + 1;
*v = -base.Y - 2;
*v = -base.Y - 1;
} else if (dir == v3s16(1,0,0)) {
*u = base.Z + 1;
*v = -base.Y - 2;
} else if (dir == v3s16(-1,0,0)) {
*u = -base.Z - 1;
*v = -base.Y - 1;
} else if (dir == v3s16(-1,0,0)) {
*u = -base.Z;
*v = -base.Y;
} else if (dir == v3s16(0,1,0)) {
*u = base.X + 1;
*v = -base.Z - 2;
*v = -base.Z - 1;
} else if (dir == v3s16(0,-1,0)) {
*u = base.X + 1;
*v = base.Z + 1;
Expand Down

0 comments on commit 1320c51

Please sign in to comment.