light: disable "Failed to calculate normal for vertex" warning because it was not really an error and causing spam

qbsp T-Juncs generate lots of colinear vertices I think?
This commit is contained in:
Eric Wasylishen 2016-04-07 21:16:54 -06:00
parent 91f321493e
commit 96a8dc8c3d
1 changed files with 5 additions and 0 deletions

View File

@ -510,11 +510,16 @@ CalcualateVertexNormals(const bsp2_t *bsp)
const int vertIndex = pair.first;
vec_t *vertNormal = pair.second.v;
if (0 == VectorNormalize(vertNormal)) {
// this happens when there are colinear vertices, which give zero-area triangles,
// so there is no contribution to the normal of the triangle in the middle of the
// line. Not really an error, just set it to use the face normal.
#if 0
logprint("Failed to calculate normal for vertex %d at (%f %f %f)\n",
vertIndex,
bsp->dvertexes[vertIndex].point[0],
bsp->dvertexes[vertIndex].point[1],
bsp->dvertexes[vertIndex].point[2]);
#endif
VectorCopy(f_norm, vertNormal);
}
}