Avoid a segfault when there's no split plane.

This commit is contained in:
Bill Currie 2011-12-04 10:55:46 +09:00
parent cdfc922bce
commit eb5d2720e4

View file

@ -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;
} }