light: improve "bad surface extents" error info
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
2a93375e0e
commit
4275149cee
|
|
@ -331,8 +331,17 @@ CalcFaceExtents(const dface_t *face, const vec3_t offset, lightsurf_t *surf)
|
|||
maxs[i] = ceil(maxs[i] / 16);
|
||||
surf->texmins[i] = mins[i];
|
||||
surf->texsize[i] = maxs[i] - mins[i];
|
||||
if (surf->texsize[i] > 17)
|
||||
Error("Bad surface extents");
|
||||
if (surf->texsize[i] > 17) {
|
||||
const dmiptexlump_t *lump = (dmiptexlump_t *)dtexdata;
|
||||
const char *texname = (char *)dtexdata + lump->dataofs[tex->miptex];
|
||||
const dplane_t *plane = dplanes + face->planenum;
|
||||
Error("Bad surface extents:\n"
|
||||
" surface %d, %s extents = %d\n"
|
||||
" Texture %s at (%s)\n"
|
||||
" surface normal (%s)\n",
|
||||
face - dfaces, i ? "t" : "s", surf->texsize[i],
|
||||
texname, VecStr(worldpoint), VecStrf(plane->normal));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue