- Rename a smoothratio variable to interpfrac to show that it's not Q16.16.

This commit is contained in:
Mitchell Richters 2022-09-07 16:43:47 +10:00 committed by Christoph Oelckers
parent a71d0779e5
commit 953364b96b
2 changed files with 4 additions and 4 deletions

View file

@ -149,7 +149,7 @@ void UpdateInterpolations()
}
}
void DoInterpolations(double smoothratio)
void DoInterpolations(double interpfrac)
{
if (!cl_interpolate) return;
for (unsigned i = 0; i < interpolations.Size(); i++)
@ -159,14 +159,14 @@ void DoInterpolations(double smoothratio)
double old = interpolations[i].old;
if (interpolations[i].type < Interp_Pan_First || fabs(bak-old) < 128.)
{
Set(interpolations[i].index, interpolations[i].actor, interpolations[i].type, old + (bak - old) * smoothratio);
Set(interpolations[i].index, interpolations[i].actor, interpolations[i].type, old + (bak - old) * interpfrac);
}
else
{
// with the panning types we need to check for potential wraparound.
if (bak < old) bak += 256.;
else old += 256;
double cur = old + (bak - old) * smoothratio;
double cur = old + (bak - old) * interpfrac;
if (cur >= 256.) cur -= 256.;
Set(interpolations[i].index, interpolations[i].actor, interpolations[i].type, cur);
}

View file

@ -32,7 +32,7 @@ void StopInterpolation(DCoreActor* actor, int type);
void UpdateInterpolations();
void ClearInterpolations();
void ClearMovementInterpolations();
void DoInterpolations(double smoothratio);
void DoInterpolations(double interpfrac);
void RestoreInterpolations();
void SerializeInterpolations(FSerializer& arc);
void clearsectinterpolate(sectortype* sectnum);