Invert yaw diff in reverse HUD tracking

This fixes the player CHECK moving in the opposite
direction of what it should across the screen.
This commit is contained in:
James R 2022-11-17 18:50:25 -08:00
parent df968e1b1a
commit 0d5d1c7a09

View file

@ -950,6 +950,11 @@ void K_ObjectTracking(trackingResult_t *result, vector3_t *point, boolean revers
h = R_PointToDist2(point->x, point->y, viewx, viewy);
da = AngleDeltaSigned(viewpointAngle, R_PointToAngle2(point->x, point->y, viewx, viewy));
if (reverse)
{
da = -(da);
}
// Set results relative to top left!
result->x = FixedMul(NEWTAN(da), fg);
result->y = FixedMul((NEWTAN(viewpointAiming) - FixedDiv((viewz - point->z), 1 + FixedMul(NEWCOS(da), h))), fg);