mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-05 13:20:56 +00:00
sw/src/interpso.cpp:so_dointerpolations:
Move ratio calculation out of inner loop.
This commit is contained in:
parent
5728241c1c
commit
217bf454f4
1 changed files with 4 additions and 3 deletions
|
@ -283,11 +283,12 @@ void so_dointerpolations(int32_t smoothratio) // Stick at b
|
||||||
!Player[screenpeek].sop_remote)))
|
!Player[screenpeek].sop_remote)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
int32_t ratio = smoothratio * synctics + 65536 * interp->tic;
|
||||||
|
ratio /= interp->lasttic;
|
||||||
|
ratio = (interp->tic == interp->lasttic) ? 65536 : ratio;
|
||||||
|
|
||||||
for (i = 0, data = interp->data; i < interp->numinterpolations; i++, data++)
|
for (i = 0, data = interp->data; i < interp->numinterpolations; i++, data++)
|
||||||
{
|
{
|
||||||
int32_t ratio = smoothratio * synctics + 65536 * interp->tic;
|
|
||||||
ratio /= interp->lasttic;
|
|
||||||
ratio = (interp->tic == interp->lasttic) ? 65536 : ratio;
|
|
||||||
if (data->spriteofang >= 0)
|
if (data->spriteofang >= 0)
|
||||||
*(int16_t *)(data->curipos) = NORM_ANGLE(data->lastoldipos + mulscale16(data->lastangdiff, ratio));
|
*(int16_t *)(data->curipos) = NORM_ANGLE(data->lastoldipos + mulscale16(data->lastangdiff, ratio));
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue