engine: client: don't go out of bounds if studio model don't have any sequences
Fixes models/null.mdl in Master Sword Rebirth. It's technically a valid model, though completely useless for renderer.
This commit is contained in:
parent
0adda483c5
commit
6a2a2c33ee
1 changed files with 1 additions and 1 deletions
|
@ -268,7 +268,7 @@ static float CL_GetStudioEstimatedFrame( cl_entity_t *ent )
|
|||
{
|
||||
pstudiohdr = (studiohdr_t *)Mod_StudioExtradata( ent->model );
|
||||
|
||||
if( pstudiohdr )
|
||||
if( pstudiohdr && pstudiohdr->numseq > 0 )
|
||||
{
|
||||
sequence = bound( 0, ent->curstate.sequence, pstudiohdr->numseq - 1 );
|
||||
pseqdesc = (mstudioseqdesc_t *)((byte *)pstudiohdr + pstudiohdr->seqindex) + sequence;
|
||||
|
|
Loading…
Add table
Reference in a new issue