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

This commit is contained in:
lachablock 2021-05-22 18:17:48 +10:00
parent d9395b0a73
commit 99ad188263

View file

@ -1533,7 +1533,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