- Exhumed: Floatify smoothratio for analyzesprites().

This commit is contained in:
Mitchell Richters 2022-09-07 17:02:14 +10:00 committed by Christoph Oelckers
parent 6716d0f2e9
commit 0625d4b65f

View file

@ -53,7 +53,7 @@ bool bCamera = false;
tspriteArray* mytspriteArray;
// NOTE - not to be confused with Ken's analyzesprites()
static void analyzesprites(tspriteArray& tsprites, int x, int y, int z, double const smoothratio)
static void analyzesprites(tspriteArray& tsprites, int x, int y, int z, double const interpfrac)
{
mytspriteArray = &tsprites;
@ -64,8 +64,8 @@ static void analyzesprites(tspriteArray& tsprites, int x, int y, int z, double c
if (pTSprite->ownerActor)
{
// interpolate sprite position
pTSprite->pos = pTSprite->ownerActor->interpolatedpos(smoothratio * (1. / MaxSmoothRatio));
pTSprite->angle = pTSprite->ownerActor->interpolatedangle(smoothratio * (1. / MaxSmoothRatio));
pTSprite->pos = pTSprite->ownerActor->interpolatedpos(interpfrac);
pTSprite->angle = pTSprite->ownerActor->interpolatedangle(interpfrac);
}
}
@ -402,7 +402,7 @@ bool GameInterface::GenerateSavePic()
void GameInterface::processSprites(tspriteArray& tsprites, int viewx, int viewy, int viewz, DAngle viewang, double smoothRatio)
{
analyzesprites(tsprites, viewx, viewy, viewz, smoothRatio);
analyzesprites(tsprites, viewx, viewy, viewz, smoothRatio * (1. / MaxSmoothRatio));
}