diff --git a/light/ltface.c b/light/ltface.c index f4d3d842..05bfe9dc 100644 --- a/light/ltface.c +++ b/light/ltface.c @@ -523,6 +523,21 @@ CalcPoints(const dmodel_t *model, const vec3_t offset, const texorg_t *texorg, l if (!NearWall(point)) continue; // all good + // First try fudging by 0.25 + bool good = false; + for (i = 0; i < 6; i++) { + vec3_t testpoint; + VectorCopy(point, testpoint); + testpoint[i/2] += (i%2) ? 0.25 : -0.25; + if (!NearWall(testpoint)) { + VectorCopy(testpoint, point); + good = true; + } + } + if (good) + continue; + + // Next try a trace for (i = 0; i < 6; i++) { const int flags = TRACE_HIT_SOLID; tracepoint_t hit;