summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2020-01-20 19:17:54 +0000
committerParamat <paramat@users.noreply.github.com>2020-01-20 19:17:54 +0000
commit0877587cce1d96b1c8c009221684ab382e8f1929 (patch)
treebb7799f5025473071722987e1fe50023d13e5d47 /src/client
parent468eb4bf5710e851b2599baeff870518f979c71a (diff)
downloadminetest-0877587cce1d96b1c8c009221684ab382e8f1929.tar.gz
minetest-0877587cce1d96b1c8c009221684ab382e8f1929.tar.bz2
minetest-0877587cce1d96b1c8c009221684ab382e8f1929.zip
Resized torchlike sprite now attaches to surface (#9303)
Diffstat (limited to 'src/client')
-rw-r--r--src/client/content_mapblock.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/client/content_mapblock.cpp b/src/client/content_mapblock.cpp
index 4a0df6171..5be0caf19 100644
--- a/src/client/content_mapblock.cpp
+++ b/src/client/content_mapblock.cpp
@@ -860,17 +860,27 @@ void MapblockMeshGenerator::drawTorchlikeNode()
for (v3f &vertex : vertices) {
switch (wall) {
case DWM_YP:
- vertex.rotateXZBy(-45); break;
+ vertex.Y += -size + BS/2;
+ vertex.rotateXZBy(-45);
+ break;
case DWM_YN:
- vertex.rotateXZBy( 45); break;
+ vertex.Y += size - BS/2;
+ vertex.rotateXZBy(45);
+ break;
case DWM_XP:
- vertex.rotateXZBy( 0); break;
+ vertex.X += -size + BS/2;
+ break;
case DWM_XN:
- vertex.rotateXZBy(180); break;
+ vertex.X += -size + BS/2;
+ vertex.rotateXZBy(180);
+ break;
case DWM_ZP:
- vertex.rotateXZBy( 90); break;
+ vertex.X += -size + BS/2;
+ vertex.rotateXZBy(90);
+ break;
case DWM_ZN:
- vertex.rotateXZBy(-90); break;
+ vertex.X += -size + BS/2;
+ vertex.rotateXZBy(-90);
}
}
drawQuad(vertices);