aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSmallJoker <mk939@ymail.com>2018-04-09 14:58:35 +0200
committerSmallJoker <mk939@ymail.com>2018-06-03 17:32:00 +0200
commit875972ffa6cfbf4621bc71f11f4f30ee2ae47851 (patch)
tree293811343f8865e7667e1b8798cb3dacb990ae23 /src
parent396daf1be1c581da70eb40f7273fb7fad894de53 (diff)
downloadminetest-875972ffa6cfbf4621bc71f11f4f30ee2ae47851.tar.gz
minetest-875972ffa6cfbf4621bc71f11f4f30ee2ae47851.tar.bz2
minetest-875972ffa6cfbf4621bc71f11f4f30ee2ae47851.zip
upright_sprite: Fix texture position for players Fixes #6471
Diffstat (limited to 'src')
-rw-r--r--src/content_cao.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/content_cao.cpp b/src/content_cao.cpp
index 994f0492a..994ff5bb5 100644
--- a/src/content_cao.cpp
+++ b/src/content_cao.cpp
@@ -835,6 +835,11 @@ void GenericCAO::addToScene(scene::ISceneManager *smgr,
video::S3DVertex( dx, dy, 0, 0,0,0, c, 0,0),
video::S3DVertex(-dx, dy, 0, 0,0,0, c, 1,0),
};
+ if (m_is_player) {
+ // Move minimal Y position to 0 (feet position)
+ for (video::S3DVertex &vertex : vertices)
+ vertex.Pos.Y += dy;
+ }
u16 indices[] = {0,1,2,2,3,0};
buf->append(vertices, 4, indices, 6);
// Set material
@@ -854,6 +859,11 @@ void GenericCAO::addToScene(scene::ISceneManager *smgr,
video::S3DVertex(-dx, dy, 0, 0,0,0, c, 0,0),
video::S3DVertex( dx, dy, 0, 0,0,0, c, 1,0),
};
+ if (m_is_player) {
+ // Move minimal Y position to 0 (feet position)
+ for (video::S3DVertex &vertex : vertices)
+ vertex.Pos.Y += dy;
+ }
u16 indices[] = {0,1,2,2,3,0};
buf->append(vertices, 4, indices, 6);
// Set material