#define COLLISION_SNAPSCALE (32.0f)
#define COLLISION_SNAP (1.0f / COLLISION_SNAPSCALE)
-#define COLLISION_PLANE_DIST_EPSILON (1.0f / 32.0f)
+#define COLLISION_SNAP2 (2.0f / COLLISION_SNAPSCALE)
+#define COLLISION_PLANE_DIST_EPSILON (2.0f / COLLISION_SNAPSCALE)
cvar_t collision_impactnudge = {0, "collision_impactnudge", "0.03125", "how much to back off from the impact"};
cvar_t collision_startnudge = {0, "collision_startnudge", "0", "how much to bias collision trace start"};
// clip it by all other planes
for (k = 0;k < numoriginalplanes && pnumpoints && pnumpoints <= pmaxpoints;k++)
{
+ // skip the plane this polygon
+ // (nothing happens if it is processed, this is just an optimization)
if (k != j)
{
// we want to keep the inside of the brush plane so we flip
{
// check if there is already a matching point (no duplicates)
for (m = 0;m < numpointsbuf;m++)
- if (VectorDistance2(&p[w][k*3], pointsbuf[m].v) < COLLISION_SNAP)
+ if (VectorDistance2(&p[w][k*3], pointsbuf[m].v) < COLLISION_SNAP2)
break;
// if there is no match, add a new one