diff --git a/source/core/rendering/hw_entrypoint.cpp b/source/core/rendering/hw_entrypoint.cpp index d8325cf61..2496a1f42 100644 --- a/source/core/rendering/hw_entrypoint.cpp +++ b/source/core/rendering/hw_entrypoint.cpp @@ -275,7 +275,7 @@ static void CheckTimer(FRenderState &state, uint64_t ShaderStartTime) void animatecamsprite(double s); -void render_drawrooms(spritetype* playersprite, const vec3_t& position, int sectnum, binangle angle, fixedhoriz horizon, binangle rollang) +void render_drawrooms(spritetype* playersprite, const vec3_t& position, int sectnum, binangle angle, fixedhoriz horizon, binangle rollang, double smoothratio) { checkRotatedWalls(); @@ -295,7 +295,7 @@ void render_drawrooms(spritetype* playersprite, const vec3_t& position, int sect // Get this before everything else FRenderViewpoint r_viewpoint = SetupViewpoint(playersprite, position, sectnum, angle, horizon, rollang); if (cl_capfps) r_viewpoint.TicFrac = 1.; - else r_viewpoint.TicFrac = I_GetTimeFrac(); + else r_viewpoint.TicFrac = smoothratio * (1/65536.); screen->mLights->Clear(); screen->mViewpoints->Clear(); diff --git a/source/core/rendering/render.h b/source/core/rendering/render.h index 1214f4f8b..256b65747 100644 --- a/source/core/rendering/render.h +++ b/source/core/rendering/render.h @@ -4,7 +4,7 @@ class FSerializer; struct IntRect; -void render_drawrooms(spritetype* playersprite, const vec3_t& position, int sectnum, binangle angle, fixedhoriz horizon, binangle rollang); +void render_drawrooms(spritetype* playersprite, const vec3_t& position, int sectnum, binangle angle, fixedhoriz horizon, binangle rollang, double smoothratio); void render_camtex(spritetype* playersprite, const vec3_t& position, int sectnum, binangle angle, fixedhoriz horizon, binangle rollang, FGameTexture* camtex, IntRect& rect, double smoothratio); struct PortalDesc diff --git a/source/games/blood/src/view.cpp b/source/games/blood/src/view.cpp index 7ec536e65..d6ee63a39 100644 --- a/source/games/blood/src/view.cpp +++ b/source/games/blood/src/view.cpp @@ -772,7 +772,7 @@ void viewDrawScreen(bool sceneonly) fixedhoriz deliriumPitchI = q16horiz(interpolatedvalue(IntToFixed(deliriumPitchO), IntToFixed(deliriumPitch), gInterpolate)); int bakCstat = gView->pSprite->cstat; gView->pSprite->cstat |= (gViewPos == 0) ? CSTAT_SPRITE_INVISIBLE : CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_TRANSLUCENT_INVERT; - render_drawrooms(gView->pSprite, { cX, cY, cZ }, nSectnum, cA, cH + deliriumPitchI, rotscrnang); + render_drawrooms(gView->pSprite, { cX, cY, cZ }, nSectnum, cA, cH + deliriumPitchI, rotscrnang, gInterpolate); gView->pSprite->cstat = bakCstat; } else diff --git a/source/games/duke/src/render.cpp b/source/games/duke/src/render.cpp index ccf06ee47..c3e11f45b 100644 --- a/source/games/duke/src/render.cpp +++ b/source/games/duke/src/render.cpp @@ -83,7 +83,7 @@ void renderView(spritetype* playersprite, int sectnum, int x, int y, int z, bina } else { - render_drawrooms(playersprite, { x, y, z }, sectnum, a, h, rotscrnang); + render_drawrooms(playersprite, { x, y, z }, sectnum, a, h, rotscrnang, smoothratio); } } diff --git a/source/games/exhumed/src/view.cpp b/source/games/exhumed/src/view.cpp index 165dd7092..0c499d47a 100644 --- a/source/games/exhumed/src/view.cpp +++ b/source/games/exhumed/src/view.cpp @@ -367,7 +367,7 @@ void DrawView(double smoothRatio, bool sceneonly) } else { - render_drawrooms(nullptr, { nCamerax, nCameray, viewz }, nSector, nCameraa, nCamerapan, rotscrnang); + render_drawrooms(nullptr, { nCamerax, nCameray, viewz }, nSector, nCameraa, nCamerapan, rotscrnang, smoothRatio); } if (HavePLURemap()) diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index d3c71e83e..a89eba696 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -1615,7 +1615,7 @@ drawscreen(PLAYERp pp, double smoothratio) else { UpdateWallPortalState(); - render_drawrooms(pp->SpriteP, { tx, ty, tz }, tsectnum, tang, thoriz, trotscrnang); + render_drawrooms(pp->SpriteP, { tx, ty, tz }, tsectnum, tang, thoriz, trotscrnang, smoothratio); RestorePortalState(); }