Duke3D: Restore old interpolations when camera is chasing actor who whacked you (idea from NY00123).

This commit is contained in:
Mitchell Richters 2020-05-11 22:14:09 +10:00 committed by Christoph Oelckers
parent 3b6b1a3063
commit d30bf548bd

View file

@ -726,9 +726,21 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
pPlayer->opos.y + mulscale16(pPlayer->pos.y - pPlayer->opos.y, smoothRatio),
pPlayer->opos.z + mulscale16(pPlayer->pos.z - pPlayer->opos.z, smoothRatio) };
CAMERA(pos) = camVect;
CAMERA(q16ang) = pPlayer->q16ang + fix16_from_int(pPlayer->look_ang);
CAMERA(q16horiz) = pPlayer->q16horiz + pPlayer->q16horizoff;
CAMERA(pos) = camVect;
if (pPlayer->wackedbyactor >= 0)
{
CAMERA(q16ang) = pPlayer->oq16ang
+ mulscale16(((pPlayer->q16ang + F16(1024) - pPlayer->oq16ang) & 0x7FFFFFF) - F16(1024), smoothRatio)
+ fix16_from_int(pPlayer->look_ang);
CAMERA(q16horiz) = pPlayer->oq16horiz + pPlayer->oq16horizoff
+ mulscale16((pPlayer->q16horiz + pPlayer->q16horizoff - pPlayer->oq16horiz - pPlayer->oq16horizoff), smoothRatio);
}
else
{
CAMERA(q16ang) = pPlayer->q16ang + fix16_from_int(pPlayer->look_ang);
CAMERA(q16horiz) = pPlayer->q16horiz + pPlayer->q16horizoff;
}
if (cl_viewbob)
{