From 034d6e129a98e33b4320a867bd327ee33f8adf62 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Mon, 3 Aug 2020 11:54:59 +1000 Subject: [PATCH] - always calculate smoothratio while paused, but only return it during play. This is so the time keeps elapsing and you don't get a large delta between the first call back to `CalcSmoothRatio()` after the previous call. --- source/games/duke/src/inlines.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/games/duke/src/inlines.h b/source/games/duke/src/inlines.h index 0f50e1dee..b6a0a9c01 100644 --- a/source/games/duke/src/inlines.h +++ b/source/games/duke/src/inlines.h @@ -171,11 +171,8 @@ inline bool playrunning() inline int calc_smoothratio(ClockTicks totalclk, ClockTicks ototalclk) { - if (!playrunning()) - { - return MaxSmoothRatio; - } - return CalcSmoothRatio(totalclk, ototalclk, REALGAMETICSPERSEC); + double smoothratio = CalcSmoothRatio(totalclk, ototalclk, REALGAMETICSPERSEC); + return (playrunning() ? smoothratio : MaxSmoothRatio); } inline void backupplayer(player_struct* p)