mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 18:01:15 +00:00
Fix the negative fractions coming from edge_portal_dist().
I have a better fix in the works, but I wanted edge_portal_dist() to be correct.
This commit is contained in:
parent
e5903a60ff
commit
ed8e09608a
1 changed files with 1 additions and 1 deletions
|
@ -368,7 +368,7 @@ edge_portal_dist (const plane_t *plane, const clipport_t *portal,
|
|||
VectorMultAdd (p1, t, e, y);
|
||||
VectorSubtract (x, y, y);
|
||||
t = DotProduct (y, vel) / DotProduct (vel, vel);
|
||||
if (t >= frac)
|
||||
if (t < 0 || t >= frac)
|
||||
continue; // this is not the nearest edge pair
|
||||
// the edges hit, and they are the closes edge pair so far
|
||||
frac = t;
|
||||
|
|
Loading…
Reference in a new issue