mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +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 {
|
||||
// crossing from an empty leaf to a solid leaf: the trace
|
||||
// has collided.
|
||||
calc_impact (hull, trace, start_point, end_point, leaf,
|
||||
split_plane);
|
||||
if (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)
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue