- Fix death camera issues stemming from f254eeb465.

* Adjustment in `__addadjustment()` needs to be signed.
* Output of `bvectangbam()` needs to be signed before Duke/SW left-shift the value.
This commit is contained in:
Mitchell Richters 2021-04-11 17:52:29 +10:00
parent 534271c62a
commit f343bd8d5e
3 changed files with 4 additions and 4 deletions

View file

@ -234,7 +234,7 @@ private:
{
if (!SyncInput())
{
adjustment += value.asbuildf();
adjustment += value.signedbuildf();
}
else
{

View file

@ -464,7 +464,7 @@ void moveplayers(void)
if (p->actorsqu != nullptr)
{
p->angle.addadjustment(getincanglebam(p->angle.ang, bvectangbam(p->actorsqu->s.x - p->posx, p->actorsqu->s.y - p->posy)) >> 2);
p->angle.addadjustment(getincanglebam(p->angle.ang, bvectangbam(p->actorsqu->s.x - p->posx, p->actorsqu->s.y - p->posy)).signedbuild() >> 2);
}
if (spri->extra > 0)
@ -487,7 +487,7 @@ void moveplayers(void)
if (p->wackedbyactor != nullptr && p->wackedbyactor->s.statnum < MAXSTATUS)
{
p->angle.addadjustment(getincanglebam(p->angle.ang, bvectangbam(p->wackedbyactor->s.x - p->posx, p->wackedbyactor->s.y - p->posy)) >> 1);
p->angle.addadjustment(getincanglebam(p->angle.ang, bvectangbam(p->wackedbyactor->s.x - p->posx, p->wackedbyactor->s.y - p->posy)).signedbuild() >> 1);
}
}
spri->ang = p->angle.ang.asbuild();

View file

@ -6125,7 +6125,7 @@ void DoPlayerDeathFollowKiller(PLAYERp pp)
if (FAFcansee(kp->x, kp->y, SPRITEp_TOS(kp), kp->sectnum, pp->posx, pp->posy, pp->posz, pp->cursectnum))
{
pp->angle.addadjustment(getincanglebam(pp->angle.ang, bvectangbam(kp->x - pp->posx, kp->y - pp->posy)) >> 4);
pp->angle.addadjustment(getincanglebam(pp->angle.ang, bvectangbam(kp->x - pp->posx, kp->y - pp->posy)).signedbuild() >> 4);
}
}
}