You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
TileSetEditor: Don't draw invalid occlusion shapes. Fixes #24238
This commit is contained in:
@@ -2460,11 +2460,13 @@ void TileSetEditor::draw_polygon_shapes() {
|
|||||||
workspace->draw_polygon(polygon, colors);
|
workspace->draw_polygon(polygon, colors);
|
||||||
|
|
||||||
if (!creating_shape) {
|
if (!creating_shape) {
|
||||||
|
if (polygon.size() > 1) {
|
||||||
for (int j = 0; j < polygon.size() - 1; j++) {
|
for (int j = 0; j < polygon.size() - 1; j++) {
|
||||||
workspace->draw_line(polygon[j], polygon[j + 1], c_border, 1, true);
|
workspace->draw_line(polygon[j], polygon[j + 1], c_border, 1, true);
|
||||||
}
|
}
|
||||||
workspace->draw_line(polygon[polygon.size() - 1], polygon[0], c_border, 1, true);
|
workspace->draw_line(polygon[polygon.size() - 1], polygon[0], c_border, 1, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (shape == edited_occlusion_shape) {
|
if (shape == edited_occlusion_shape) {
|
||||||
draw_handles = true;
|
draw_handles = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user