mirror of
https://github.com/minetest/minetest.git
synced 2024-12-24 15:12:23 +01:00
parent
af868421da
commit
d58801ab32
@ -516,6 +516,11 @@ void GenericCAO::addToScene(ITextureSource *tsrc)
|
|||||||
video::S3DVertex( dx, dy, 0, 0,0,0, c, 0,0),
|
video::S3DVertex( dx, dy, 0, 0,0,0, c, 0,0),
|
||||||
video::S3DVertex(-dx, dy, 0, 0,0,0, c, 1,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};
|
u16 indices[] = {0,1,2,2,3,0};
|
||||||
buf->append(vertices, 4, indices, 6);
|
buf->append(vertices, 4, indices, 6);
|
||||||
// Set material
|
// Set material
|
||||||
@ -535,6 +540,11 @@ void GenericCAO::addToScene(ITextureSource *tsrc)
|
|||||||
video::S3DVertex(-dx, dy, 0, 0,0,0, c, 0,0),
|
video::S3DVertex(-dx, dy, 0, 0,0,0, c, 0,0),
|
||||||
video::S3DVertex( dx, dy, 0, 0,0,0, c, 1,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};
|
u16 indices[] = {0,1,2,2,3,0};
|
||||||
buf->append(vertices, 4, indices, 6);
|
buf->append(vertices, 4, indices, 6);
|
||||||
// Set material
|
// Set material
|
||||||
|
Loading…
Reference in New Issue
Block a user