Merge branch '1297-ff_randomanim-can-go-out-of-bounds-for-spr_play' into 'next'

Fix regression in P_SetupStateAnimation

Closes #1297

See merge request STJr/SRB2!2549
This commit is contained in:
LJ Sonic 2024-12-03 20:00:07 +00:00
commit d8ac5c2a93

View file

@ -90,7 +90,7 @@ static void P_SetupStateAnimation(mobj_t *mobj, state_t *st)
if (mobj->sprite == SPR_PLAY && mobj->skin)
{
spritedef_t *spritedef = P_GetSkinSpritedef(mobj->skin, mobj->sprite2);
animlength = (INT32)(spritedef->numframes);
animlength = (INT32)(spritedef->numframes) - 1;
}
else
animlength = st->var1;