From 2fc38e02067f6596370375b7d2713dbbcfff812c Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 4 Sep 2004 13:16:00 +0000 Subject: [PATCH] more tolerance to deviations in calculated plane distances compared to the stored planes git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4434 d7cf8633-e32d-0410-b094-e92efae38249 --- collision.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/collision.c b/collision.c index 2306aded..7387a9e5 100644 --- a/collision.c +++ b/collision.c @@ -825,7 +825,7 @@ void Collision_TraceBrushBrushFloat(trace_t *trace, const colbrushf_t *thisbrush return; } f = furthestplanedist_float(startplane->normal, thisbrush_start->points, thisbrush_start->numpoints); - if (fabs(f - startplane->dist) > 0.01f) + if (fabs(f - startplane->dist) > 0.125f) Con_Printf("startplane->dist %f != calculated %f (thisbrush_start)\n", startplane->dist, f); } d1 = nearestplanedist_float(startplane->normal, thisbrush_start->points, thisbrush_start->numpoints) - furthestplanedist_float(startplane->normal, thatbrush_start->points, thatbrush_start->numpoints) - collision_startnudge.value; @@ -844,7 +844,7 @@ void Collision_TraceBrushBrushFloat(trace_t *trace, const colbrushf_t *thisbrush return; } f = furthestplanedist_float(startplane->normal, thatbrush_start->points, thatbrush_start->numpoints); - if (fabs(f - startplane->dist) > 0.01f) + if (fabs(f - startplane->dist) > 0.125f) Con_Printf("startplane->dist %f != calculated %f (thatbrush_start)\n", startplane->dist, f); } d1 = nearestplanedist_float(startplane->normal, thisbrush_start->points, thisbrush_start->numpoints) - startplane->dist - collision_startnudge.value; @@ -973,7 +973,7 @@ void Collision_TraceLineBrushFloat(trace_t *trace, const vec3_t linestart, const if (thatbrush_start->numpoints) { f = furthestplanedist_float(startplane->normal, thatbrush_start->points, thatbrush_start->numpoints); - if (fabs(f - startplane->dist) > 0.01f) + if (fabs(f - startplane->dist) > 0.125f) Con_Printf("startplane->dist %f != calculated %f\n", startplane->dist, f); } } -- 2.39.2