if (t->trace->allsolid)
t->trace->startsolid = true;
#if COLLISIONPARANOID >= 3
- Con_Printf("S");
+ Con_Print("S");
#endif
return HULLCHECKSTATE_SOLID;
}
{
t->trace->allsolid = false;
#if COLLISIONPARANOID >= 3
- Con_Printf("E");
+ Con_Print("E");
#endif
return HULLCHECKSTATE_EMPTY;
}
if (t2 < 0)
{
#if COLLISIONPARANOID >= 3
- Con_Printf("<");
+ Con_Print("<");
#endif
num = node->children[1];
goto loc0;
if (t2 >= 0)
{
#if COLLISIONPARANOID >= 3
- Con_Printf(">");
+ Con_Print(">");
#endif
num = node->children[0];
goto loc0;
// the line intersects, find intersection point
// LordHavoc: this uses the original trace for maximum accuracy
#if COLLISIONPARANOID >= 3
- Con_Printf("M");
+ Con_Print("M");
#endif
if (plane->type < 3)
{
t->trace->fraction = bound(0, midf, 1);
#if COLLISIONPARANOID >= 3
- Con_Printf("D");
+ Con_Print("D");
#endif
return HULLCHECKSTATE_DONE;
}
printbrush = false;
if (!brush->numpoints)
{
- Con_Printf("Collision_ValidateBrush: brush with no points!\n");
+ Con_Print("Collision_ValidateBrush: brush with no points!\n");
printbrush = true;
}
#if 0
// it's ok for a brush to have one point and no planes...
if (brush->numplanes == 0 && brush->numpoints != 1)
{
- Con_Printf("Collision_ValidateBrush: brush with no planes and more than one point!\n");
+ Con_Print("Collision_ValidateBrush: brush with no planes and more than one point!\n");
printbrush = true;
}
#endif
}
if (pointsoffplanes == 0) // all points are on all planes
{
- Con_Printf("Collision_ValidateBrush: all points lie on all planes (degenerate, no brush volume!)\n");
+ Con_Print("Collision_ValidateBrush: all points lie on all planes (degenerate, no brush volume!)\n");
printbrush = true;
}
}
// check if there are too many and skip the brush
if (numplanes >= 256)
{
- Con_Printf("Mod_Q3BSP_LoadBrushes: failed to build collision brush: too many planes for buffer\n");
+ Con_Print("Mod_Q3BSP_LoadBrushes: failed to build collision brush: too many planes for buffer\n");
return NULL;
}
// check if there are too many polygon vertices for buffer
if (numpolypoints > maxpolypoints)
{
- Con_Printf("Collision_NewBrushFromPlanes: failed to build collision brush: too many points for buffer\n");
+ Con_Print("Collision_NewBrushFromPlanes: failed to build collision brush: too many points for buffer\n");
return NULL;
}
// check if there are too many triangle elements for buffer
if (numelements + (w->numpoints - 2) * 3 > maxelements)
{
- Con_Printf("Collision_NewBrushFromPlanes: failed to build collision brush: too many triangle elements for buffer\n");
+ Con_Print("Collision_NewBrushFromPlanes: failed to build collision brush: too many triangle elements for buffer\n");
return NULL;
}
// check if there are too many and skip the brush
if (numpoints >= 256)
{
- Con_Printf("Collision_NewBrushFromPlanes: failed to build collision brush: too many points for buffer\n");
+ Con_Print("Collision_NewBrushFromPlanes: failed to build collision brush: too many points for buffer\n");
Winding_Free(w);
return NULL;
}
void Collision_CalcPlanesForPolygonBrushFloat(colbrushf_t *brush)
{
int i;
- float edge0[3], edge1[3], edge2[3], normal[3], dist, bestdist, temp[3];
+ float edge0[3], edge1[3], edge2[3], normal[3], dist, bestdist;
colpointf_t *p, *p2;
if (brush->numpoints == 3)
if (developer.integer)
{
// validation code
+#if 0
+ float temp[3];
+
VectorSubtract(brush->points[0].v, brush->points[1].v, edge0);
VectorSubtract(brush->points[2].v, brush->points[1].v, edge1);
- CrossProduct(edge1, edge0, normal);
+ CrossProduct(edge0, edge1, normal);
VectorNormalize(normal);
VectorSubtract(normal, brush->planes[0].normal, temp);
if (VectorLength(temp) > 0.01f)
Con_Printf("Collision_CalcPlanesForPolygonBrushFloat: plane 3 (%f %f %f %f) is not perpendicular to edge 1 (%f %f %f to %f %f %f)\n", brush->planes[3].normal[0], brush->planes[3].normal[1], brush->planes[3].normal[2], brush->planes[3].dist, brush->points[0].v[0], brush->points[0].v[1], brush->points[0].v[2], brush->points[1].v[0], brush->points[1].v[1], brush->points[1].v[2]);
if (fabs(DotProduct(brush->planes[4].normal, edge2)) > 0.01f)
Con_Printf("Collision_CalcPlanesForPolygonBrushFloat: plane 4 (%f %f %f %f) is not perpendicular to edge 2 (%f %f %f to %f %f %f)\n", brush->planes[4].normal[0], brush->planes[4].normal[1], brush->planes[4].normal[2], brush->planes[4].dist, brush->points[1].v[0], brush->points[1].v[1], brush->points[1].v[2], brush->points[2].v[0], brush->points[2].v[1], brush->points[2].v[2]);
+#endif
#endif
if (fabs(DotProduct(brush->points[0].v, brush->planes[0].normal) - brush->planes[0].dist) > 0.01f || fabs(DotProduct(brush->points[1].v, brush->planes[0].normal) - brush->planes[0].dist) > 0.01f || fabs(DotProduct(brush->points[2].v, brush->planes[0].normal) - brush->planes[0].dist) > 0.01f)
Con_Printf("Collision_CalcPlanesForPolygonBrushFloat: edges (%f %f %f to %f %f %f to %f %f %f) off front plane 0 (%f %f %f %f)\n", brush->points[0].v[0], brush->points[0].v[1], brush->points[0].v[2], brush->points[1].v[0], brush->points[1].v[1], brush->points[1].v[2], brush->points[2].v[0], brush->points[2].v[1], brush->points[2].v[2], brush->planes[0].normal[0], brush->planes[0].normal[1], brush->planes[0].normal[2], brush->planes[0].dist);
// any brush with degenerate planes is not worth handling
if (DotProduct(startplane->normal, startplane->normal) < 0.9f || DotProduct(endplane->normal, endplane->normal) < 0.9f)
{
- Con_Printf("Collision_TraceBrushBrushFloat: degenerate thisbrush plane!\n");
+ Con_Print("Collision_TraceBrushBrushFloat: degenerate thisbrush plane!\n");
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)
{
- Con_Printf("Collision_TraceBrushBrushFloat: degenerate thatbrush plane!\n");
+ Con_Print("Collision_TraceBrushBrushFloat: degenerate thatbrush plane!\n");
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)
{
- Con_Printf("Collision_TraceLineBrushFloat: degenerate plane!\n");
+ Con_Print("Collision_TraceLineBrushFloat: degenerate plane!\n");
return;
}
if (thatbrush_start->numpoints)
{
if (numpoints > 256)
{
- Con_Printf("Polygon with more than 256 points not supported yet (fixme!)\n");
+ Con_Print("Polygon with more than 256 points not supported yet (fixme!)\n");
return;
}
polyf_brush.numpoints = numpoints;
{
if (numpoints > 256)
{
- Con_Printf("Polygon with more than 256 points not supported yet (fixme!)\n");
+ Con_Print("Polygon with more than 256 points not supported yet (fixme!)\n");
return;
}
polyf_brush.numpoints = numpoints;
int i;
if (numpoints > 256)
{
- Con_Printf("Polygon with more than 256 points not supported yet (fixme!)\n");
+ Con_Print("Polygon with more than 256 points not supported yet (fixme!)\n");
return;
}
polyf_brushstart.numpoints = numpoints;