mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
Avoid a segfault when there's no split plane.
This commit is contained in:
parent
cdfc922bce
commit
eb5d2720e4
1 changed files with 7 additions and 2 deletions
|
@ -688,8 +688,13 @@ MOD_TraceLine (hull_t *hull, int num,
|
||||||
} else {
|
} else {
|
||||||
// crossing from an empty leaf to a solid leaf: the trace
|
// crossing from an empty leaf to a solid leaf: the trace
|
||||||
// has collided.
|
// has collided.
|
||||||
calc_impact (hull, trace, start_point, end_point, leaf,
|
if (split_plane) {
|
||||||
split_plane);
|
calc_impact (hull, trace, start_point, end_point, leaf,
|
||||||
|
split_plane);
|
||||||
|
} else {
|
||||||
|
// if there's no split plane, then there is no impact
|
||||||
|
trace->fraction = 1.0;
|
||||||
|
}
|
||||||
if (trace->type == tr_point)
|
if (trace->type == tr_point)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue