// the line intersects, find intersection point
// LordHavoc: this uses the original trace for maximum accuracy
#if COLLISIONPARANOID >= 3
// the line intersects, find intersection point
// LordHavoc: this uses the original trace for maximum accuracy
#if COLLISIONPARANOID >= 3
t->trace->fraction = bound(0, midf, 1);
#if COLLISIONPARANOID >= 3
t->trace->fraction = bound(0, midf, 1);
#if COLLISIONPARANOID >= 3
printbrush = true;
}
#if 0
// it's ok for a brush to have one point and no planes...
if (brush->numplanes == 0 && brush->numpoints != 1)
{
printbrush = true;
}
#if 0
// it's ok for a brush to have one point and no planes...
if (brush->numplanes == 0 && brush->numpoints != 1)
{
return NULL;
}
// check if there are too many triangle elements for buffer
if (numelements + (w->numpoints - 2) * 3 > maxelements)
{
return NULL;
}
// check if there are too many triangle elements for buffer
if (numelements + (w->numpoints - 2) * 3 > maxelements)
{
// any brush with degenerate planes is not worth handling
if (DotProduct(startplane->normal, startplane->normal) < 0.9f || DotProduct(endplane->normal, endplane->normal) < 0.9f)
{
// any brush with degenerate planes is not worth handling
if (DotProduct(startplane->normal, startplane->normal) < 0.9f || DotProduct(endplane->normal, endplane->normal) < 0.9f)
{
return;
}
f = furthestplanedist_float(startplane->normal, thisbrush_start->points, thisbrush_start->numpoints);
return;
}
f = furthestplanedist_float(startplane->normal, thisbrush_start->points, thisbrush_start->numpoints);
// any brush with degenerate planes is not worth handling
if (DotProduct(startplane->normal, startplane->normal) < 0.9f || DotProduct(endplane->normal, endplane->normal) < 0.9f)
{
// any brush with degenerate planes is not worth handling
if (DotProduct(startplane->normal, startplane->normal) < 0.9f || DotProduct(endplane->normal, endplane->normal) < 0.9f)
{
return;
}
f = furthestplanedist_float(startplane->normal, thatbrush_start->points, thatbrush_start->numpoints);
return;
}
f = furthestplanedist_float(startplane->normal, thatbrush_start->points, thatbrush_start->numpoints);
// any brush with degenerate planes is not worth handling
if (DotProduct(startplane->normal, startplane->normal) < 0.9f || DotProduct(endplane->normal, endplane->normal) < 0.9f)
{
// any brush with degenerate planes is not worth handling
if (DotProduct(startplane->normal, startplane->normal) < 0.9f || DotProduct(endplane->normal, endplane->normal) < 0.9f)
{