1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-12 16:15:20 +02:00

Fix upright sprite entities not animating

This commit is contained in:
Lars Müller
2024-09-06 12:11:16 +02:00
committed by GitHub
parent 041d67ceca
commit 9e5d6bc162
3 changed files with 11 additions and 16 deletions

View File

@@ -1264,6 +1264,16 @@ void GenericCAO::step(float dtime, ClientEnvironment *env)
}
}
static void setMeshBufferTextureCoords(scene::IMeshBuffer *buf, const v2f *uv, u32 count)
{
assert(buf->getVertexType() == video::EVT_STANDARD);
assert(buf->getVertexCount() == count);
auto *vertices = static_cast<video::S3DVertex *>(buf->getVertices());
for (u32 i = 0; i < count; i++)
vertices[i].TCoords = uv[i];
buf->setDirty(scene::EBT_VERTEX);
}
void GenericCAO::updateTexturePos()
{
if(m_spritenode)