From 73b93ffd74bebea1e576bf4a44e7aa1316c7f1ad Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 20 Nov 2011 14:56:07 +0900 Subject: [PATCH] Clean up the in_leaf test line. --- libs/models/trace.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/models/trace.c b/libs/models/trace.c index bef5947a6..8b953e73c 100644 --- a/libs/models/trace.c +++ b/libs/models/trace.c @@ -204,10 +204,10 @@ MOD_TraceLine (hull_t *hull, int num, // it's not possible to not be in the leaf when doing a point trace // if leaf is null, assume we're in the leaf // if plane is null, the trace did not cross the last node plane - int in_leaf = (trace->type == tr_point || !leaf || !split_plane - || check_in_leaf (hull, trace, leaf, - split_plane, - vel, start)); + int in_leaf = 1; + if (trace->type != tr_point && leaf && split_plane) + in_leaf = check_in_leaf (hull, trace, leaf, split_plane, + vel, start); if (in_leaf && num == CONTENTS_SOLID) { if (!seen_empty && !seen_solid) { // this is the first leaf visited, thus the start leaf