mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 20:11:44 +00:00
Always show the bones of models that exist purely to hold skeletal animations (with no actual meshes).
This commit is contained in:
parent
5474a5a5c8
commit
5a6cbc4375
1 changed files with 11 additions and 2 deletions
|
@ -3497,6 +3497,7 @@ static void M_ModelViewerDraw(int x, int y, struct menucustom_s *c, struct emenu
|
||||||
modelview_t *mods = c->dptr;
|
modelview_t *mods = c->dptr;
|
||||||
skinfile_t *skin;
|
skinfile_t *skin;
|
||||||
texnums_t *texnums;
|
texnums_t *texnums;
|
||||||
|
qboolean boneanimsonly;
|
||||||
|
|
||||||
if (R2D_Flush)
|
if (R2D_Flush)
|
||||||
R2D_Flush();
|
R2D_Flush();
|
||||||
|
@ -3807,7 +3808,15 @@ static void M_ModelViewerDraw(int x, int y, struct menucustom_s *c, struct emenu
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (mods->mode == MV_BONES)
|
boneanimsonly = false;
|
||||||
|
if (ent.model && ent.model->loadstate == MLS_LOADED && ent.model->type == mod_alias)
|
||||||
|
{ //some models don't actually contain any mesh data, but exist as containers for skeletal animations that can be skel_built into a different model's anims.
|
||||||
|
//always show their bones, so users don't think its an engine bug.
|
||||||
|
galiasinfo_t *inf = Mod_Extradata(ent.model);
|
||||||
|
if (inf && !inf->nextsurf && !inf->numindexes && inf->numbones)
|
||||||
|
boneanimsonly = true;
|
||||||
|
}
|
||||||
|
if (mods->mode == MV_BONES || boneanimsonly)
|
||||||
{
|
{
|
||||||
shader_t *lineshader;
|
shader_t *lineshader;
|
||||||
int tags = Mod_GetNumBones(ent.model, true);
|
int tags = Mod_GetNumBones(ent.model, true);
|
||||||
|
@ -4328,7 +4337,7 @@ void M_Menu_ModelViewer_f(void)
|
||||||
menu->menu.persist = true;
|
menu->menu.persist = true;
|
||||||
mv = menu->data;
|
mv = menu->data;
|
||||||
c = MC_AddCustom(menu, 64, 32, mv, 0, NULL);
|
c = MC_AddCustom(menu, 64, 32, mv, 0, NULL);
|
||||||
menu->cursoritem = (menuoption_t*)c;
|
menu->selecteditem = menu->cursoritem = (menuoption_t*)c;
|
||||||
c->draw = M_ModelViewerDraw;
|
c->draw = M_ModelViewerDraw;
|
||||||
c->key = M_ModelViewerKey;
|
c->key = M_ModelViewerKey;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue