Another test, another bug.

Fix an incorrect test using offset (forgot to negate).
This commit is contained in:
Bill Currie 2011-11-12 18:12:56 +09:00
parent 9984a2e87a
commit b82d9f5894
2 changed files with 3 additions and 1 deletions

View file

@ -210,6 +210,8 @@ test_t tests[] = {
{ -16, 0, 8}, {16, 0, 24}, { 0.5, 0, 0, 1, 0}},
{"Box, Step 1", &box, &hull_step1,
{ -16, 0, 8}, {16, 0, 24}, { 0.25, 0, 0, 1, 0}},
{"Box, Step 1", &box, &hull_step1,
{ -16, 0, 8}, {16, 0, 40}, { 0.25, 0, 0, 1, 0}},
};
#define num_tests (sizeof (tests) / sizeof (tests[0]))

View file

@ -199,7 +199,7 @@ MOD_TraceLine (hull_t *hull, int num,
num = node->children[0];
continue;
}
if (start_dist < offset && end_dist < offset) {
if (start_dist < -offset && end_dist < -offset) {
// entirely behind the plane
num = node->children[1];
continue;