From be2efc03ad06c07b7d513529900143b94b6e0d33 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 3 Jan 2022 22:07:31 +0100 Subject: [PATCH] - Exhumed: interpolate the scrolling map. --- wadsrc/static/zscript/games/exhumed/ui/screens.zs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wadsrc/static/zscript/games/exhumed/ui/screens.zs b/wadsrc/static/zscript/games/exhumed/ui/screens.zs index fc60c64dd..f5c096808 100644 --- a/wadsrc/static/zscript/games/exhumed/ui/screens.zs +++ b/wadsrc/static/zscript/games/exhumed/ui/screens.zs @@ -382,8 +382,8 @@ class MapScreen : ScreenJob override void Draw(double smoothratio) { int currentclock = int((ticks + smoothratio) * 120 / GameTicRate); - - int tileY = curYPos; + int myCurYPos = curYPos == destYPos? curYPos : curYPos - int((1. - smoothratio) * delta); + int tileY = myCurYPos; // Draw the background screens for (int i = 0; i < 10; i++) @@ -410,7 +410,7 @@ class MapScreen : ScreenJob String nTile = String.Format("MAPFIRE_%d%d", nFireType+1, nFireFrame+1); int smokeX = x + FireTilesX[nFireType*3 + nFireFrame]; - int smokeY = y + FireTilesY[nFireType*3 + nFireFrame] + curYPos + screenY; + int smokeY = y + FireTilesY[nFireType*3 + nFireFrame] + myCurYPos + screenY; // Use rotatesprite to trim smoke in widescreen Exhumed.DrawAbs(nTile, smokeX, smokeY); @@ -423,7 +423,7 @@ class MapScreen : ScreenJob String nTile = String.Format("MapPlaque%d_%02d", t+1, i+1); int nameX = mapPlaqueX[i]; - int nameY = mapPlaqueY[i] + curYPos + screenY; + int nameY = mapPlaqueY[i] + myCurYPos + screenY; // Draw level name plaque Exhumed.DrawAbs(nTile, nameX, nameY);