浏览代码

LoadModelAnimationsIQM: fix corrupted animation names (#4026)

Correctly copies animation names from IQM animation to raylib animation.
pull/4027/head
Jett 8 个月前
committed by GitHub
父节点
当前提交
2998f8671b
找不到此签名对应的密钥 GPG 密钥 ID: B5690EEEBB952194
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. +2
    -0
      src/rmodels.c

+ 2
- 0
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++)

正在加载...
取消
保存