- use clamp instead of bit masking to handle out of range interpolation factors for models.

This commit is contained in:
Christoph Oelckers 2021-03-15 11:35:39 +01:00
parent 60979ee478
commit 8aa59f2385

View file

@ -646,7 +646,7 @@ static void updateanimation(md2model_t *m, tspriteptr_t tspr, uint8_t lpal)
//Printf("not smoothing... cframe %i nframe %i\n", m->cframe, m->nframe);
}
m->interpol = ((float)(i&65535))/65536.f;
m->interpol = clamp(i, 0, 65535) / 65536.f;
//Printf("interpol %f\n", m->interpol);
prep_return: