mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-20 18:28:15 +00:00
LoadModelAnimationsIQM: fix corrupted animation names (#4026)
Correctly copies animation names from IQM animation to raylib animation.
This commit is contained in:
@@ -4621,6 +4621,8 @@ static ModelAnimation *LoadModelAnimationsIQM(const char *fileName, int *animCou
|
|||||||
animations[a].boneCount = iqmHeader->num_poses;
|
animations[a].boneCount = iqmHeader->num_poses;
|
||||||
animations[a].bones = RL_MALLOC(iqmHeader->num_poses*sizeof(BoneInfo));
|
animations[a].bones = RL_MALLOC(iqmHeader->num_poses*sizeof(BoneInfo));
|
||||||
animations[a].framePoses = RL_MALLOC(anim[a].num_frames*sizeof(Transform *));
|
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?
|
// animations[a].framerate = anim.framerate; // TODO: Use animation framerate data?
|
||||||
|
|
||||||
for (unsigned int j = 0; j < iqmHeader->num_poses; j++)
|
for (unsigned int j = 0; j < iqmHeader->num_poses; j++)
|
||||||
|
Reference in New Issue
Block a user