mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
adopt sam heading to new heading class
This commit is contained in:
parent
dd50ee92a9
commit
458de17b8f
@ -72,7 +72,7 @@ class GroupGenerator(Generic[GroupT, UnitT, UnitTypeT, TgoT]):
|
|||||||
) -> UnitT:
|
) -> UnitT:
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def heading_to_conflict(self) -> int:
|
def heading_to_conflict(self) -> Heading:
|
||||||
# Heading for a Group to the enemy.
|
# Heading for a Group to the enemy.
|
||||||
# Should be the point between the nearest and the most distant conflict
|
# Should be the point between the nearest and the most distant conflict
|
||||||
conflicts: dict[MissionTarget, float] = {}
|
conflicts: dict[MissionTarget, float] = {}
|
||||||
@ -91,7 +91,9 @@ class GroupGenerator(Generic[GroupT, UnitT, UnitTypeT, TgoT]):
|
|||||||
(closest_conflict.position.y + most_distant_conflict.position.y) / 2,
|
(closest_conflict.position.y + most_distant_conflict.position.y) / 2,
|
||||||
)
|
)
|
||||||
|
|
||||||
return int(self.go.position.heading_between_point(conflict_center))
|
return Heading.from_degrees(
|
||||||
|
self.go.position.heading_between_point(conflict_center)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class VehicleGroupGenerator(
|
class VehicleGroupGenerator(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user