Merge branch 'models-spr2endstate' into 'next'

Fix models interpolating to frame 0 from a same-sprite2 FF_SPR2ENDSTATE state

See merge request STJr/SRB2!1515
This commit is contained in:
sphere 2021-06-02 06:28:51 -04:00
commit fb453491dd

View file

@ -1525,7 +1525,12 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
{
nextFrame = (spr->mobj->frame & FF_FRAMEMASK) + 1;
if (nextFrame >= mod)
nextFrame = 0;
{
if (spr->mobj->state->frame & FF_SPR2ENDSTATE)
nextFrame--;
else
nextFrame = 0;
}
if (frame || !(spr->mobj->state->frame & FF_SPR2ENDSTATE))
nextFrame = md2->model->spr2frames[spr2].frames[nextFrame];
else