Merge pull request #50766 from lawnjelly/portals_warn_room_planes

Portals - Config warning for Rooms with too many planes
This commit is contained in:
Rémi Verschelde 2021-07-23 14:24:53 +02:00 committed by GitHub
commit 322252e89f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -225,6 +225,13 @@ String Room::get_configuration_warning() const {
}
}
if (_planes.size() > 80) {
if (!warning.empty()) {
warning += "\n\n";
}
warning += TTR("Room convex hull contains a large number of planes.\nConsider simplifying the room bound in order to increase performance.");
}
return warning;
}

View File

@ -796,6 +796,7 @@ void RoomManager::_third_pass_rooms(const LocalVector<Portal *> &p_portals) {
found_errors = true;
}
room->update_gizmo();
room->update_configuration_warning();
}
if (found_errors) {