mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-22 01:45:19 +01:00
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
@ -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…
Reference in New Issue
Block a user