Skip to content

Commit d7a8d63

Browse files
JettMonstersGoBoomJayLCypher
authored and
JayLCypher
committed
LoadModelAnimationsIQM: fix corrupted animation names (raysan5#4026)
Correctly copies animation names from IQM animation to raylib animation.
1 parent 56500ad commit d7a8d63

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/rmodels.c

+2
Original file line numberDiff line numberDiff line change
@@ -4621,6 +4621,8 @@ static ModelAnimation *LoadModelAnimationsIQM(const char *fileName, int *animCou
46214621
animations[a].boneCount = iqmHeader->num_poses;
46224622
animations[a].bones = RL_MALLOC(iqmHeader->num_poses*sizeof(BoneInfo));
46234623
animations[a].framePoses = RL_MALLOC(anim[a].num_frames*sizeof(Transform *));
4624+
memcpy(animations[a].name, fileDataPtr + iqmHeader->ofs_text + anim[a].name, 32); // I don't like this 32 here
4625+
TraceLog(LOG_INFO, "IQM Anim %s", animations[a].name);
46244626
// animations[a].framerate = anim.framerate; // TODO: Use animation framerate data?
46254627

46264628
for (unsigned int j = 0; j < iqmHeader->num_poses; j++)

0 commit comments

Comments
 (0)