Skip to content

Commit

Permalink
MDL, MDX, and MD2: Parse the Model Events after Framegroups instead o…
Browse files Browse the repository at this point in the history
…therwise the events won't load
  • Loading branch information
Xylemon committed Sep 23, 2024
1 parent 0976808 commit eb6ff7b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions engine/common/com_mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -4349,9 +4349,8 @@ static qboolean QDECL Mod_LoadQ1Model (model_t *mod, void *buffer, size_t fsize)

mod->type = mod_alias;
Mod_ClampModelSize(mod);
Mod_ParseModelEvents(mod, galias->ofsanimations, galias->numanimations);

Mesh_HandleFramegroupsFile(mod, galias);
Mod_ParseModelEvents(mod, galias->ofsanimations, galias->numanimations);

mod->numframes = galias->numanimations;
mod->meshinfo = galias;
Expand Down Expand Up @@ -4694,8 +4693,8 @@ static qboolean QDECL Mod_LoadQ2Model (model_t *mod, void *buffer, size_t fsize)
*/

Mod_ClampModelSize(mod);
Mod_ParseModelEvents(mod, galias->ofsanimations, galias->numanimations);
Mesh_HandleFramegroupsFile(mod, galias);
Mod_ParseModelEvents(mod, galias->ofsanimations, galias->numanimations);

mod->meshinfo = galias;
mod->numframes = galias->numanimations;
Expand Down Expand Up @@ -5069,6 +5068,7 @@ static qboolean QDECL Mod_LoadKingpinModel (model_t *mod, void *buffer, size_t f

mod->radius = RadiusFromBounds(mod->mins, mod->maxs);
Mod_ClampModelSize(mod);
Mesh_HandleFramegroupsFile(mod, galias);
Mod_ParseModelEvents(mod, root->ofsanimations, root->numanimations);

mod->meshinfo = root;
Expand Down

0 comments on commit eb6ff7b

Please sign in to comment.