summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2021-08-19 18:14:04 +0000
committerGitHub <noreply@github.com>2021-08-19 20:14:04 +0200
commit1320c51d8e15409544cba970a97b167a37513bae (patch)
treed5f1b1cc2b1364a3c68ef4495f838e831058a44d /src
parent24b66dede00c8a5336adc6c1fafc837ee688c9ad (diff)
downloadminetest-1320c51d8e15409544cba970a97b167a37513bae.tar.gz
minetest-1320c51d8e15409544cba970a97b167a37513bae.tar.bz2
minetest-1320c51d8e15409544cba970a97b167a37513bae.zip
Fix scaled world-aligned textures being aligned inconsistently for non-normal drawtypes
Diffstat (limited to 'src')
-rw-r--r--src/client/mapblock_mesh.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/client/mapblock_mesh.cpp b/src/client/mapblock_mesh.cpp
index 402217066..03522eca9 100644
--- a/src/client/mapblock_mesh.cpp
+++ b/src/client/mapblock_mesh.cpp
@@ -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;