]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
check for out of bounds fraction
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 27 Oct 2002 12:11:48 +0000 (12:11 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 27 Oct 2002 12:11:48 +0000 (12:11 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2567 d7cf8633-e32d-0410-b094-e92efae38249

collision.c

index 01904128dcdead51fa278538459cf78dbac82bb6..7ed1291eaf18c06a3ecce7840bd6c11529c0716c 100644 (file)
@@ -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)