- add oq16ang to weaponhit struct to allow interpolation of security cameras at full precision.

* Improves implementation from f64083bda9.
This commit is contained in:
Mitchell Richters 2020-07-29 08:36:38 +10:00
parent 843cc94b6f
commit 1fc117341e
3 changed files with 3 additions and 2 deletions

View file

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

View file

@ -587,7 +587,7 @@ void displayrooms(int snum, int smoothratio)
if (p->newowner >= 0)
{
fixed_t oang = hittype[p->newowner].tempang << FRACBITS;
fixed_t oang = hittype[p->newowner].oq16ang;
cang = q16ang(oang + mulscale16(((p->q16ang + dang - oang) & 0x7FFFFFF) - dang, smoothratio));
choriz = q16horiz(p->q16horiz + p->q16horizoff);
cposx = p->posx;

View file

@ -25,6 +25,7 @@ struct weaponhit
short timetosleep;
int floorz, ceilingz, lastvx, lastvy, bposx, bposy, bposz, aflags;
int temp_data[6];
fixed_t oq16ang; // for interpolating security cameras in displayrooms() when p->newowner >= 0.
};
struct animwalltype