From b0e5e9fc7223f72cecde5c882a61ccb208d1f3a9 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 10 Jan 2021 18:15:28 +0100 Subject: [PATCH] - Exhumed: fixed camera position interpolation. This was still using old the old game-specific method. Moving up a lift now interpolates properly, but there's still an unrelated issue when moving down. --- source/exhumed/src/view.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/exhumed/src/view.cpp b/source/exhumed/src/view.cpp index 5abd88456..4e1f7585e 100644 --- a/source/exhumed/src/view.cpp +++ b/source/exhumed/src/view.cpp @@ -237,10 +237,11 @@ void DrawView(double smoothRatio, bool sceneonly) } else { - playerX = interpolate16(PlayerList[nLocalPlayer].opos.x, sprite[nPlayerSprite].x, smoothRatio); - playerY = interpolate16(PlayerList[nLocalPlayer].opos.y, sprite[nPlayerSprite].y, smoothRatio); - playerZ = interpolate16(PlayerList[nLocalPlayer].opos.z, sprite[nPlayerSprite].z, smoothRatio) - + interpolate16(oeyelevel[nLocalPlayer], eyelevel[nLocalPlayer], smoothRatio); + auto psp = &sprite[nPlayerSprite]; + playerX = psp->interpolatedx(smoothRatio); + playerY = psp->interpolatedy(smoothRatio); + playerZ = psp->interpolatedz(smoothRatio) + interpolate16(oeyelevel[nLocalPlayer], eyelevel[nLocalPlayer], smoothRatio); + nSector = nPlayerViewSect[nLocalPlayer]; updatesector(playerX, playerY, &nSector);