- backport camera interpolation from DukeGDX. Fixes #63.

This commit is contained in:
Mitchell Richters 2020-07-29 06:57:01 +10:00
parent 10e4482245
commit f64083bda9
2 changed files with 2 additions and 1 deletions

View file

@ -2710,6 +2710,7 @@ void processinput_d(int snum)
if (p->newowner >= 0)
{
i = p->newowner;
hittype[i].tempang = p->getang();
p->posx = sprite[i].x;
p->posy = sprite[i].y;
p->posz = sprite[i].z;

View file

@ -586,7 +586,7 @@ void displayrooms(int snum, int smoothratio)
if (p->newowner >= 0)
{
cang = q16ang(p->q16ang + p->q16look_ang);
cang = q16ang((hittype[p->newowner].tempang << FRACBITS) + mulscale16(((p->q16ang + (1024 << FRACBITS) - (hittype[p->newowner].tempang << FRACBITS)) & 0x7FFFFFF) - (1024 << FRACBITS), smoothratio));
choriz = q16horiz(p->q16horiz + p->q16horizoff);
cposx = p->posx;
cposy = p->posy;