Skip to content

Commit ad07197

Browse files
Fixed UnloadModelAnimation() to use a count
1 parent a417182 commit ad07197

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

include/ModelAnimation.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ class ModelAnimation : public ::ModelAnimation {
2626
other.keyframePoses = nullptr;
2727
}
2828

29-
~ModelAnimation() { Unload(); }
29+
// TODO: Implement a way to unload all animations at once, as the current Unload() only unloads one animation.
30+
~ModelAnimation() { Unload(1); }
3031

3132
/**
3233
* Load model animations from file
@@ -57,7 +58,7 @@ class ModelAnimation : public ::ModelAnimation {
5758
return *this;
5859
}
5960

60-
Unload();
61+
Unload(1);
6162
set(other);
6263

6364
other.boneCount = 0;
@@ -70,7 +71,7 @@ class ModelAnimation : public ::ModelAnimation {
7071
/**
7172
* Unload animation data
7273
*/
73-
void Unload() { ::UnloadModelAnimation(*this); }
74+
void Unload(int animCount) { ::UnloadModelAnimation(this, animCount); }
7475

7576
/**
7677
* Update model animation pose

0 commit comments

Comments
 (0)