@@ -2277,7 +2277,6 @@ void UpdateModelAnimationBones(Model model, ModelAnimation anim, int frame)
2277
2277
{
2278
2278
if (model .meshes [i ].boneMatrices )
2279
2279
{
2280
- assert (model .meshes [i ].boneCount == anim .boneCount );
2281
2280
if (firstMeshWithBones == -1 )
2282
2281
{
2283
2282
firstMeshWithBones = i ;
@@ -2286,7 +2285,6 @@ void UpdateModelAnimationBones(Model model, ModelAnimation anim, int frame)
2286
2285
}
2287
2286
}
2288
2287
2289
-
2290
2288
// Update all bones and boneMatrices of first mesh with bones.
2291
2289
for (int boneId = 0 ; boneId < anim .boneCount ; boneId ++ )
2292
2290
{
@@ -2351,7 +2349,8 @@ void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
2351
2349
bool updated = false; // Flag to check when anim vertex information is updated
2352
2350
const int vValues = mesh .vertexCount * 3 ;
2353
2351
2354
- if ((mesh .boneWeights == NULL ) || (mesh .boneIds == NULL )) continue ; // skip if missing bone data, causes segfault without on some models
2352
+ // Skip if missing bone data, causes segfault without on some models
2353
+ if ((mesh .boneWeights == NULL ) || (mesh .boneIds == NULL )) continue ;
2355
2354
2356
2355
for (int vCounter = 0 ; vCounter < vValues ; vCounter += 3 )
2357
2356
{
@@ -2364,7 +2363,8 @@ void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
2364
2363
mesh .animNormals [vCounter + 1 ] = 0 ;
2365
2364
mesh .animNormals [vCounter + 2 ] = 0 ;
2366
2365
}
2367
- // Iterates over 4 bones per vertex
2366
+
2367
+ // Iterates over 4 bones per vertex
2368
2368
for (int j = 0 ; j < 4 ; j ++ , boneCounter ++ )
2369
2369
{
2370
2370
boneWeight = mesh .boneWeights [boneCounter ];
@@ -2395,8 +2395,7 @@ void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
2395
2395
if (updated )
2396
2396
{
2397
2397
rlUpdateVertexBuffer (mesh .vboId [0 ], mesh .animVertices , mesh .vertexCount * 3 * sizeof (float ), 0 ); // Update vertex position
2398
- if (mesh .normals != NULL )
2399
- rlUpdateVertexBuffer (mesh .vboId [2 ], mesh .animNormals , mesh .vertexCount * 3 * sizeof (float ), 0 ); // Update vertex normals
2398
+ if (mesh .normals != NULL ) rlUpdateVertexBuffer (mesh .vboId [2 ], mesh .animNormals , mesh .vertexCount * 3 * sizeof (float ), 0 ); // Update vertex normals
2400
2399
}
2401
2400
}
2402
2401
}
0 commit comments