diff --git a/include/qbsp/brush.hh b/include/qbsp/brush.hh index 1cac2765..57e47c22 100644 --- a/include/qbsp/brush.hh +++ b/include/qbsp/brush.hh @@ -37,9 +37,6 @@ struct side_t int16_t lmshift; - qvec3d origin; - vec_t radius; - bool onnode; // has this face been used as a BSP node plane yet? bool visible = true; // can any part of this side be seen from non-void parts of the level? // non-visible means we can discard the brush side diff --git a/include/qbsp/csg4.hh b/include/qbsp/csg4.hh index d0a518a9..d3f15e5e 100644 --- a/include/qbsp/csg4.hh +++ b/include/qbsp/csg4.hh @@ -36,6 +36,5 @@ face_t *CopyFace(const face_t *in); face_t *MirrorFace(const face_t *face); std::tuple SplitFace(face_t *in, const qplane3d &split); void UpdateFaceSphere(face_t *in); -void UpdateFaceSphere(side_t *in); bool BrushGE(const bspbrush_t &a, const bspbrush_t &b); std::vector> ChopBrushes(const std::vector> &input); diff --git a/qbsp/brush.cc b/qbsp/brush.cc index db96de81..c931f331 100644 --- a/qbsp/brush.cc +++ b/qbsp/brush.cc @@ -459,7 +459,6 @@ static std::vector CreateBrushFaces(const mapentity_t *src, hullbrush_t f.planenum = FindPositivePlane(plane, &f.planeside); CheckFace(&f, mapface); - UpdateFaceSphere(&f); } // Rotatable objects must have a bounding box big enough to diff --git a/qbsp/brushbsp.cc b/qbsp/brushbsp.cc index 495b0746..3b069bec 100644 --- a/qbsp/brushbsp.cc +++ b/qbsp/brushbsp.cc @@ -111,14 +111,7 @@ inline int FaceSide(const face_t *in, const qbsp_plane_t &split) inline int FaceSide(const side_t *in, const qbsp_plane_t &split) { - vec_t dist = split.distance_to(in->origin); - - if (dist > in->radius) - return SIDE_FRONT; - else if (dist < -in->radius) - return SIDE_BACK; - else - return FaceSide__(in->w, split); + return FaceSide__(in->w, split); } /* diff --git a/qbsp/csg4.cc b/qbsp/csg4.cc index 4e6194ea..d7f21490 100644 --- a/qbsp/csg4.cc +++ b/qbsp/csg4.cc @@ -80,16 +80,6 @@ void UpdateFaceSphere(face_t *in) in->radius = sqrt(in->radius); } -void UpdateFaceSphere(side_t *in) -{ - in->origin = in->w.center(); - in->radius = 0; - for (size_t i = 0; i < in->w.size(); i++) { - in->radius = max(in->radius, qv::distance2(in->w[i], in->origin)); - } - in->radius = sqrt(in->radius); -} - /* ================== SplitFace