fix camp weiredness (#3941)

pull/3944/head
Kaalleen 2025-08-27 18:00:28 +02:00 zatwierdzone przez GitHub
rodzic 3be34ba8a3
commit bf29b6c7bd
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 20 dodań i 21 usunięć

Wyświetl plik

@ -131,8 +131,7 @@ def clamp_path_to_polygon(path, polygon):
# The second part of this or condition checks whether part of the
# path was removed by difference() above, because it coincided
# with part of the shape border.
if not was_inside or last_point_inside.distance(start) > 0.01:
if last_point_inside is not None:
if not was_inside and last_point_inside is not None:
# We traveled outside or on the border of the shape for
# a while. In either case, we need to add a path along the
# border between the exiting and entering points.