mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 14:20:59 +00:00
Check the cross product length before testing its direction.
This fixes the bogus portal crossings.
This commit is contained in:
parent
5af88d33fe
commit
4ed8b69e24
1 changed files with 2 additions and 0 deletions
|
@ -211,6 +211,8 @@ point_inside_portal (const clipport_t *portal, const plane_t *plane,
|
|||
for (i = 0; i < points->numpoints; i++) {
|
||||
VectorSubtract (p, points->points[i], x);
|
||||
CrossProduct (x, edges->points[i], c);
|
||||
if (DotProduct (c, c) < PLANE_EPSILON)
|
||||
return false;
|
||||
if (DotProduct (c, n) <= 0)
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue