From c51326e8b084ebb46f67340afaebdfa286421fdd Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Wed, 21 Jan 2015 13:32:52 -0700 Subject: [PATCH] trace.c: Undo part of cc36d8e that flipped the signs of ON_EPSILON for one of the checks in the TraceLine. This fixes cracks in sunlight shadows spotted by Lunaran, and greatly improves the AO quality --- light/trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/light/trace.c b/light/trace.c index 0af2bb51..dda24036 100644 --- a/light/trace.c +++ b/light/trace.c @@ -187,11 +187,11 @@ TraceLine(const dmodel_t *model, const int traceflags, break; } - if (frontdist > ON_EPSILON && backdist > ON_EPSILON) { + if (frontdist > -ON_EPSILON && backdist > -ON_EPSILON) { node = tnode->children[0]; continue; } - if (frontdist < -ON_EPSILON && backdist < -ON_EPSILON) { + if (frontdist < ON_EPSILON && backdist < ON_EPSILON) { node = tnode->children[1]; continue; }