From b06ec342142cd88de99d796a32213da943ceca17 Mon Sep 17 00:00:00 2001 From: Jett <30197659+JettMonstersGoBoom@users.noreply.github.com> Date: Mon, 23 Dec 2024 19:23:47 -0500 Subject: [PATCH] correct place. --- src/rmodels.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rmodels.c b/src/rmodels.c index 276861c29..3fcd5cea7 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -2286,7 +2286,6 @@ void UpdateModelAnimationBones(Model model, ModelAnimation anim, int frame) } } - if ((mesh.boneWeights==NULL) || (mesh.boneIds==NULL)) continue; // skip if missing bone data, causes segfault without on some models // Update all bones and boneMatrices of first mesh with bones. for (int boneId = 0; boneId < anim.boneCount; boneId++) @@ -2352,6 +2351,8 @@ void UpdateModelAnimation(Model model, ModelAnimation anim, int frame) bool updated = false; // Flag to check when anim vertex information is updated const int vValues = mesh.vertexCount*3; + if ((mesh.boneWeights==NULL) || (mesh.boneIds==NULL)) continue; // skip if missing bone data, causes segfault without on some models + for (int vCounter = 0; vCounter < vValues; vCounter += 3) { mesh.animVertices[vCounter] = 0;