- 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 else
{ {
playerX = interpolate16(PlayerList[nLocalPlayer].opos.x, sprite[nPlayerSprite].x, smoothRatio); auto psp = &sprite[nPlayerSprite];
playerY = interpolate16(PlayerList[nLocalPlayer].opos.y, sprite[nPlayerSprite].y, smoothRatio); playerX = psp->interpolatedx(smoothRatio);
playerZ = interpolate16(PlayerList[nLocalPlayer].opos.z, sprite[nPlayerSprite].z, smoothRatio) playerY = psp->interpolatedy(smoothRatio);
+ interpolate16(oeyelevel[nLocalPlayer], eyelevel[nLocalPlayer], smoothRatio); playerZ = psp->interpolatedz(smoothRatio) + interpolate16(oeyelevel[nLocalPlayer], eyelevel[nLocalPlayer], smoothRatio);
nSector = nPlayerViewSect[nLocalPlayer]; nSector = nPlayerViewSect[nLocalPlayer];
updatesector(playerX, playerY, &nSector); updatesector(playerX, playerY, &nSector);