From 4147f4e4f3341da88dfbe4df2c5bdab97e8cd08c Mon Sep 17 00:00:00 2001
From: havoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Date: Thu, 13 Jan 2005 06:11:38 +0000
Subject: [PATCH] bound the fractions in CL_TraceLine instead of posting a
 warning, as out of bounds fractions have no harmful effects during a trace
 (to allow the bounds in the trace code to be removed)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4918 d7cf8633-e32d-0410-b094-e92efae38249
---
 cl_collision.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cl_collision.c b/cl_collision.c
index c0725fa0..5e59158f 100644
--- a/cl_collision.c
+++ b/cl_collision.c
@@ -96,7 +96,9 @@ float CL_TraceLine(const vec3_t start, const vec3_t end, vec3_t impact, vec3_t n
 			}
 		}
 	}
-	if (maxfrac < 0 || maxfrac > 1) Con_Printf("fraction out of bounds %f %s:%d\n", maxfrac, __FILE__, __LINE__);
+	maxfrac = bound(0, maxfrac, 1);
+	maxrealfrac = bound(0, maxrealfrac, 1);
+	//if (maxfrac < 0 || maxfrac > 1) Con_Printf("fraction out of bounds %f %s:%d\n", maxfrac, __FILE__, __LINE__);
 	if (impact)
 		VectorLerp(start, maxfrac, end, impact);
 	return maxfrac;
-- 
2.39.5