fixup! fixup! Fix physics quirkiness on slopes with convex sectors

This commit is contained in:
Gustaf Alhäll 2023-12-29 21:42:01 +01:00
parent 76becac078
commit faaf379c37
No known key found for this signature in database
GPG key ID: 6C1F67D690CDEDFD

View file

@ -1035,9 +1035,9 @@ boolean R_IsPointInSector(sector_t *sector, fixed_t x, fixed_t y)
v2 = sector->lines[i]->v2;
// do some correction in order to prevent points outside the line from being measured.
if (R_PointToDist2(v.x, v.y, v1->x, v1->y) > R_PointToDist2(v1->x, v1->y, v2->x, v2->y))
v = *v1;
else if (R_PointToDist2(v.x, v.y, v2->x, v2->y) > R_PointToDist2(v1->x, v1->y, v2->x, v2->y))
v = *v2;
else if (R_PointToDist2(v.x, v.y, v2->x, v2->y) > R_PointToDist2(v1->x, v1->y, v2->x, v2->y))
v = *v1;
dist = R_PointToDist2(v.x, v.y, x, y);
if (dist < closestdist)
{