From 53743ddf0e7100aaf6ceb90a54e2980bd5661dd3 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Mon, 10 Jul 2017 21:46:14 -0600 Subject: [PATCH] qbsp: SubdivideFace: revert change to splitting logic from 1630b87 Fixes #160 --- qbsp/surfaces.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/qbsp/surfaces.cc b/qbsp/surfaces.cc index 13ffb559..39cf6700 100644 --- a/qbsp/surfaces.cc +++ b/qbsp/surfaces.cc @@ -96,10 +96,14 @@ SubdivideFace(face_t *f, face_t **prevptr) VectorCopy(tmp, plane.normal); v = VectorLength(plane.normal); VectorNormalize(plane.normal); - if (subdiv > extent/2) /* if we're near a boundary, just split the difference, this should balance the load slightly */ - plane.dist = (mins + subdiv/2) / v; - else - plane.dist = (mins + subdiv) / v; + + // ericw -- reverted this, was causing https://github.com/ericwa/tyrutils-ericw/issues/160 +// if (subdiv > extent/2) /* if we're near a boundary, just split the difference, this should balance the load slightly */ +// plane.dist = (mins + subdiv/2) / v; +// else +// plane.dist = (mins + subdiv) / v; + plane.dist = (mins + subdiv - 16) / v; + next = f->next; SplitFace(f, &plane, &front, &back); if (!front || !back)