diff options
| author | Jett <[email protected]> | 2024-06-02 05:51:25 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-06-02 11:51:25 +0200 |
| commit | 2998f8671beaec6d1faed8f40c16a9ec31cab7c0 (patch) | |
| tree | 8bd6be669fc665fc71ce2df61dada9207b65092d /src | |
| parent | 1344979c708bdf5000d8963d26d938ae4db5d771 (diff) | |
| download | raylib-2998f8671beaec6d1faed8f40c16a9ec31cab7c0.tar.gz raylib-2998f8671beaec6d1faed8f40c16a9ec31cab7c0.zip | |
LoadModelAnimationsIQM: fix corrupted animation names (#4026)
Correctly copies animation names from IQM animation to raylib animation.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rmodels.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rmodels.c b/src/rmodels.c index 4bf042d5..e1e9418c 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -4621,6 +4621,8 @@ static ModelAnimation *LoadModelAnimationsIQM(const char *fileName, int *animCou animations[a].boneCount = iqmHeader->num_poses; animations[a].bones = RL_MALLOC(iqmHeader->num_poses*sizeof(BoneInfo)); animations[a].framePoses = RL_MALLOC(anim[a].num_frames*sizeof(Transform *)); + memcpy(animations[a].name, fileDataPtr + iqmHeader->ofs_text + anim[a].name, 32); // I don't like this 32 here + TraceLog(LOG_INFO, "IQM Anim %s", animations[a].name); // animations[a].framerate = anim.framerate; // TODO: Use animation framerate data? for (unsigned int j = 0; j < iqmHeader->num_poses; j++) |
