mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
new frontline position finding method; AA for strikes; other minor fixes and adjustments
This commit is contained in:
@@ -80,8 +80,16 @@ class OverviewCanvas:
|
||||
self.canvas.create_line((coords[0], coords[1], connected_coords[0], connected_coords[1]), width=2, fill=color)
|
||||
|
||||
if cp.captured and not connected_cp.captured and Conflict.has_frontline_between(cp, connected_cp):
|
||||
frontline_pos, heading, distance = Conflict.frontline_vector(cp, connected_cp, self.game.theater)
|
||||
distance = max(distance, 1000)
|
||||
frontline = Conflict.frontline_vector(cp, connected_cp, self.game.theater)
|
||||
if not frontline:
|
||||
print(cp, connected_cp)
|
||||
continue
|
||||
|
||||
frontline_pos, heading, distance = frontline
|
||||
if distance < 10000:
|
||||
frontline_pos = frontline_pos.point_from_heading(heading + 180, 5000)
|
||||
distance = 10000
|
||||
|
||||
start_coords = self.transform_point(frontline_pos, treshold=10)
|
||||
end_coords = self.transform_point(frontline_pos.point_from_heading(heading, distance), treshold=60)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user