mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +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:
|
||||
raise NotImplementedError
|
||||
|
||||
def heading_to_conflict(self) -> int:
|
||||
def heading_to_conflict(self) -> Heading:
|
||||
# Heading for a Group to the enemy.
|
||||
# Should be the point between the nearest and the most distant conflict
|
||||
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,
|
||||
)
|
||||
|
||||
return int(self.go.position.heading_between_point(conflict_center))
|
||||
return Heading.from_degrees(
|
||||
self.go.position.heading_between_point(conflict_center)
|
||||
)
|
||||
|
||||
|
||||
class VehicleGroupGenerator(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user