diff --git a/qbsp/brush.cc b/qbsp/brush.cc index 113917e5..e1350218 100644 --- a/qbsp/brush.cc +++ b/qbsp/brush.cc @@ -934,16 +934,16 @@ bool bspbrush_t::update_bounds(bool warn_on_failures) for (size_t i = 0; i < 3; i++) { // todo: map_source_location in bspbrush_t - if (this->bounds.mins()[0] <= -qbsp_options.worldextent.value() || - this->bounds.maxs()[0] >= qbsp_options.worldextent.value()) { + if (this->bounds.mins()[i] <= -qbsp_options.worldextent.value() || + this->bounds.maxs()[i] >= qbsp_options.worldextent.value()) { if (warn_on_failures) { logging::print( "WARNING: {}: brush bounds out of range\n", mapbrush ? mapbrush->line : parser_source_location()); } return false; } - if (this->bounds.mins()[0] >= qbsp_options.worldextent.value() || - this->bounds.maxs()[0] <= -qbsp_options.worldextent.value()) { + if (this->bounds.mins()[i] >= qbsp_options.worldextent.value() || + this->bounds.maxs()[i] <= -qbsp_options.worldextent.value()) { if (warn_on_failures) { logging::print( "WARNING: {}: no visible sides on brush\n", mapbrush ? mapbrush->line : parser_source_location()); diff --git a/qbsp/map.cc b/qbsp/map.cc index 5fbc2609..fb333101 100644 --- a/qbsp/map.cc +++ b/qbsp/map.cc @@ -374,12 +374,12 @@ inline void CalculateBrushBounds(mapbrush_t &ob) } for (size_t i = 0; i < 3; i++) { - if (ob.bounds.mins()[0] <= -qbsp_options.worldextent.value() || - ob.bounds.maxs()[0] >= qbsp_options.worldextent.value()) { + if (ob.bounds.mins()[i] <= -qbsp_options.worldextent.value() || + ob.bounds.maxs()[i] >= qbsp_options.worldextent.value()) { logging::print("WARNING: {}: brush bounds out of range\n", ob.line); } - if (ob.bounds.mins()[0] >= qbsp_options.worldextent.value() || - ob.bounds.maxs()[0] <= -qbsp_options.worldextent.value()) { + if (ob.bounds.mins()[i] >= qbsp_options.worldextent.value() || + ob.bounds.maxs()[i] <= -qbsp_options.worldextent.value()) { logging::print("WARNING: {}: no visible sides on brush\n", ob.line); } }