Skip to content

Commit ae3c0df

Browse files
committed
Reviewed formating, removed assert() #4635
1 parent a7686c4 commit ae3c0df

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/rmodels.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2277,7 +2277,6 @@ void UpdateModelAnimationBones(Model model, ModelAnimation anim, int frame)
22772277
{
22782278
if (model.meshes[i].boneMatrices)
22792279
{
2280-
assert(model.meshes[i].boneCount == anim.boneCount);
22812280
if (firstMeshWithBones == -1)
22822281
{
22832282
firstMeshWithBones = i;
@@ -2286,7 +2285,6 @@ void UpdateModelAnimationBones(Model model, ModelAnimation anim, int frame)
22862285
}
22872286
}
22882287

2289-
22902288
// Update all bones and boneMatrices of first mesh with bones.
22912289
for (int boneId = 0; boneId < anim.boneCount; boneId++)
22922290
{
@@ -2351,7 +2349,8 @@ void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
23512349
bool updated = false; // Flag to check when anim vertex information is updated
23522350
const int vValues = mesh.vertexCount*3;
23532351

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;
23552354

23562355
for (int vCounter = 0; vCounter < vValues; vCounter += 3)
23572356
{
@@ -2364,7 +2363,8 @@ void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
23642363
mesh.animNormals[vCounter + 1] = 0;
23652364
mesh.animNormals[vCounter + 2] = 0;
23662365
}
2367-
// Iterates over 4 bones per vertex
2366+
2367+
// Iterates over 4 bones per vertex
23682368
for (int j = 0; j < 4; j++, boneCounter++)
23692369
{
23702370
boneWeight = mesh.boneWeights[boneCounter];
@@ -2395,8 +2395,7 @@ void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
23952395
if (updated)
23962396
{
23972397
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
24002399
}
24012400
}
24022401
}

0 commit comments

Comments
 (0)