Don't call init_box when not doing a box trace.

I took the opportunity to pass qf through callgrind. init_box was
surprisingly expensive, especially considering its results were never used.
This commit is contained in:
Bill Currie 2011-12-25 17:11:48 +09:00
parent 55a0ed49cd
commit 91afdcf064

View file

@ -804,7 +804,8 @@ MOD_TraceLine (hull_t *hull, int num,
trace_state.seen_solid = false;
trace_state.moved = false;
trace_state.split_plane = 0;
init_box (trace, &trace_state.box, trace_state.dist);
if (trace->type == tr_box)
init_box (trace, &trace_state.box, trace_state.dist);
leaf = 0;
plane = 0;