VectorCopy(endd, rhc.end);
VectorCopy(rhc.end, rhc.trace->endpos);
VectorSubtract(rhc.end, rhc.start, rhc.dist);
- if (DotProduct(rhc.dist, rhc.dist) > 0.00001)
+ if (rhc.dist[0] || rhc.dist[1] || rhc.dist[2])
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)
VectorSubtract(end, offset, rhc.end);
VectorCopy(rhc.end, rhc.trace->endpos);
VectorSubtract(rhc.end, rhc.start, rhc.dist);
- if (DotProduct(rhc.dist, rhc.dist) > 0.00001)
+ if (rhc.dist[0] || rhc.dist[1] || rhc.dist[2])
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)