fix bounds checks only checking [0]
This commit is contained in:
parent
a2ec923b2c
commit
19500bca0a
|
|
@ -934,16 +934,16 @@ bool bspbrush_t::update_bounds(bool warn_on_failures)
|
||||||
|
|
||||||
for (size_t i = 0; i < 3; i++) {
|
for (size_t i = 0; i < 3; i++) {
|
||||||
// todo: map_source_location in bspbrush_t
|
// todo: map_source_location in bspbrush_t
|
||||||
if (this->bounds.mins()[0] <= -qbsp_options.worldextent.value() ||
|
if (this->bounds.mins()[i] <= -qbsp_options.worldextent.value() ||
|
||||||
this->bounds.maxs()[0] >= qbsp_options.worldextent.value()) {
|
this->bounds.maxs()[i] >= qbsp_options.worldextent.value()) {
|
||||||
if (warn_on_failures) {
|
if (warn_on_failures) {
|
||||||
logging::print(
|
logging::print(
|
||||||
"WARNING: {}: brush bounds out of range\n", mapbrush ? mapbrush->line : parser_source_location());
|
"WARNING: {}: brush bounds out of range\n", mapbrush ? mapbrush->line : parser_source_location());
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this->bounds.mins()[0] >= qbsp_options.worldextent.value() ||
|
if (this->bounds.mins()[i] >= qbsp_options.worldextent.value() ||
|
||||||
this->bounds.maxs()[0] <= -qbsp_options.worldextent.value()) {
|
this->bounds.maxs()[i] <= -qbsp_options.worldextent.value()) {
|
||||||
if (warn_on_failures) {
|
if (warn_on_failures) {
|
||||||
logging::print(
|
logging::print(
|
||||||
"WARNING: {}: no visible sides on brush\n", mapbrush ? mapbrush->line : parser_source_location());
|
"WARNING: {}: no visible sides on brush\n", mapbrush ? mapbrush->line : parser_source_location());
|
||||||
|
|
|
||||||
|
|
@ -374,12 +374,12 @@ inline void CalculateBrushBounds(mapbrush_t &ob)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < 3; i++) {
|
for (size_t i = 0; i < 3; i++) {
|
||||||
if (ob.bounds.mins()[0] <= -qbsp_options.worldextent.value() ||
|
if (ob.bounds.mins()[i] <= -qbsp_options.worldextent.value() ||
|
||||||
ob.bounds.maxs()[0] >= qbsp_options.worldextent.value()) {
|
ob.bounds.maxs()[i] >= qbsp_options.worldextent.value()) {
|
||||||
logging::print("WARNING: {}: brush bounds out of range\n", ob.line);
|
logging::print("WARNING: {}: brush bounds out of range\n", ob.line);
|
||||||
}
|
}
|
||||||
if (ob.bounds.mins()[0] >= qbsp_options.worldextent.value() ||
|
if (ob.bounds.mins()[i] >= qbsp_options.worldextent.value() ||
|
||||||
ob.bounds.maxs()[0] <= -qbsp_options.worldextent.value()) {
|
ob.bounds.maxs()[i] <= -qbsp_options.worldextent.value()) {
|
||||||
logging::print("WARNING: {}: no visible sides on brush\n", ob.line);
|
logging::print("WARNING: {}: no visible sides on brush\n", ob.line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue