From be754d44bd1101cd835d861f4add592f0a6b483b Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 27 Oct 2002 12:11:48 +0000 Subject: [PATCH] check for out of bounds fraction git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2567 d7cf8633-e32d-0410-b094-e92efae38249 --- collision.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/collision.c b/collision.c index 01904128..7ed1291e 100644 --- a/collision.c +++ b/collision.c @@ -380,6 +380,7 @@ void Collision_ClipTrace (trace_t *trace, const void *cent, const model_t *cmode RecursiveHullCheck (&rhc, rhc.hull->firstclipnode, 0, 1, rhc.start, rhc.end); else RecursiveHullCheckPoint (&rhc, rhc.hull->firstclipnode); + if (rhc.trace->fraction < 0 || rhc.trace->fraction > 1) Con_Printf("fraction out of bounds %f %s:%d\n", rhc.trace->fraction, __LINE__, __FILE__); // if we hit, unrotate endpos and normal, and store the entity we hit if (rhc.trace->fraction != 1) @@ -422,6 +423,7 @@ void Collision_ClipTrace (trace_t *trace, const void *cent, const model_t *cmode RecursiveHullCheck (&rhc, rhc.hull->firstclipnode, 0, 1, rhc.start, rhc.end); else RecursiveHullCheckPoint (&rhc, rhc.hull->firstclipnode); + if (rhc.trace->fraction < 0 || rhc.trace->fraction > 1) Con_Printf("fraction out of bounds %f %s:%d\n", rhc.trace->fraction, __LINE__, __FILE__); // if we hit, store the entity we hit if (rhc.trace->fraction != 1) -- 2.39.2