From: havoc Date: Sun, 27 Oct 2002 12:11:48 +0000 (+0000) Subject: check for out of bounds fraction X-Git-Tag: RELEASE_0_2_0_RC1~112 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;ds=sidebyside;h=be754d44bd1101cd835d861f4add592f0a6b483b;p=xonotic%2Fdarkplaces.git check for out of bounds fraction git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2567 d7cf8633-e32d-0410-b094-e92efae38249 --- 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)