mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix Ground units ... don't move forward #601
This commit is contained in:
parent
2288b7f7b2
commit
666858f8e2
@ -487,11 +487,11 @@ class ConflictTheater:
|
||||
for inclusion_zone in self.landmap[0]:
|
||||
nearest_pair = ops.nearest_points(point, inclusion_zone)
|
||||
nearest_points.append(nearest_pair[1])
|
||||
min_distance = None # type: Optional[geometry.Point]
|
||||
nearest_point = None # type: Optional[geometry.Point]
|
||||
for pt in nearest_points:
|
||||
min_distance = point.distance(nearest_points[0]) # type: geometry.Point
|
||||
nearest_point = nearest_points[0] # type: geometry.Point
|
||||
for pt in nearest_points[1:]:
|
||||
distance = point.distance(pt)
|
||||
if not min_distance or distance < min_distance:
|
||||
if distance < min_distance:
|
||||
min_distance = distance
|
||||
nearest_point = pt
|
||||
assert isinstance(nearest_point, geometry.Point)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user