mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-11 13:21:10 +01:00
Fix Occluder Poly gizmo warning spam
The call to draw the handles in the OccluderPoly was spamming errors when the hole has no points. This PR prevents trying to draw the gizmo for the hole when there are no points, which prevents the spam.
This commit is contained in:
parent
42b0cd29ab
commit
fb4c62b273
@ -4982,10 +4982,14 @@ void OccluderSpatialGizmo::redraw() {
|
||||
const OccluderShapePolygon *occ_poly = get_occluder_shape_poly();
|
||||
if (occ_poly) {
|
||||
// main poly
|
||||
_redraw_poly(false, occ_poly->_poly_pts_local, occ_poly->_poly_pts_local_raw);
|
||||
if (occ_poly->_poly_pts_local_raw.size()) {
|
||||
_redraw_poly(false, occ_poly->_poly_pts_local, occ_poly->_poly_pts_local_raw);
|
||||
}
|
||||
|
||||
// hole
|
||||
_redraw_poly(true, occ_poly->_hole_pts_local, occ_poly->_hole_pts_local_raw);
|
||||
if (occ_poly->_hole_pts_local_raw.size()) {
|
||||
_redraw_poly(true, occ_poly->_hole_pts_local, occ_poly->_hole_pts_local_raw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user