- SW: Remove extern'd smoothratio variable.

This commit is contained in:
Mitchell Richters 2022-09-07 19:35:40 +10:00 committed by Christoph Oelckers
parent 3019f9effc
commit 61ec3490e8
3 changed files with 4 additions and 14 deletions

View file

@ -1062,11 +1062,11 @@ void PrintSpriteInfo(PLAYER* pp)
}
void DrawCrosshair(PLAYER* pp)
static void DrawCrosshair(PLAYER* pp, const double inputfrac)
{
if (!(CameraTestMode))
{
::DrawCrosshair(2326, pp->actor->user.Health, -pp->angle.look_anghalf(smoothratio * (1. / MaxSmoothRatio)), (pp->Flags & PF_VIEW_FROM_OUTSIDE) ? 5 : 0, 2, shadeToLight(10));
::DrawCrosshair(2326, pp->actor->user.Health, -pp->angle.look_anghalf(inputfrac), (pp->Flags & PF_VIEW_FROM_OUTSIDE) ? 5 : 0, 2, shadeToLight(10));
}
}
@ -1526,7 +1526,7 @@ void drawscreen(PLAYER* pp, double smoothratio, bool sceneonly)
#endif
UpdateStatusBar();
DrawCrosshair(pp);
DrawCrosshair(pp, smoothratio * (1. / MaxSmoothRatio));
DoPlayerDiveMeter(pp); // Do the underwater breathing bar
// Boss Health Meter, if Boss present

View file

@ -709,18 +709,9 @@ void GameInterface::Ticker(void)
void GameInterface::Render()
{
if (paused)
{
smoothratio = MaxSmoothRatio;
}
else
{
smoothratio = !cl_interpolate || cl_capfps ? MaxSmoothRatio : I_GetTimeFrac() * MaxSmoothRatio;
}
drawtime.Reset();
drawtime.Clock();
drawscreen(Player + screenpeek, smoothratio, false);
drawscreen(Player + screenpeek, (paused || !cl_interpolate || cl_capfps ? 1. : I_GetTimeFrac()) * MaxSmoothRatio, false);
drawtime.Unclock();
}

View file

@ -1891,7 +1891,6 @@ extern int *lastpacket2clock;
//
///////////////////////////
extern double smoothratio;
extern int MoveSkip4, MoveSkip2, MoveSkip8;
extern int MinEnemySkill;
extern short screenpeek;