- 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.
This commit is contained in:
Christoph Oelckers 2021-01-10 18:15:28 +01:00
parent e2f546862b
commit b0e5e9fc72

View file

@ -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);