1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

fix oopsie

This commit is contained in:
Lars Mueller 2025-01-20 19:44:57 +01:00
parent 0e457bd78b
commit 46cd7b28a6

View file

@ -471,8 +471,10 @@ SkinnedMesh *SkinnedMeshBuilder::finalize()
for (size_t i = 0; i < AllJoints.size(); ++i) {
auto *joint = AllJoints[i];
joint->GlobalInversedMatrix = matrices[i];
joint->GlobalInversedMatrix->makeInverse();
if (!joint->GlobalInversedMatrix) {
joint->GlobalInversedMatrix = matrices[i];
joint->GlobalInversedMatrix->makeInverse();
}
// rigid animation for non animated meshes
for (u32 attachedMeshIdx : joint->AttachedMeshes) {
SSkinMeshBuffer *Buffer = (*SkinningBuffers)[attachedMeshIdx];