mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08: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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user