mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Refactor ingress altitude
This commit is contained in:
parent
2746636119
commit
c0406e7c3c
@ -31,7 +31,7 @@ class DeadIngressBuilder(PydcsWaypointBuilder):
|
||||
task = AttackGroup(
|
||||
miz_group.id,
|
||||
weapon_type=WeaponType.Guided,
|
||||
altitude=round(self.flight.coalition.doctrine.ingress_altitude.meters),
|
||||
altitude=waypoint.alt,
|
||||
)
|
||||
waypoint.tasks.append(task)
|
||||
|
||||
@ -42,7 +42,7 @@ class DeadIngressBuilder(PydcsWaypointBuilder):
|
||||
weapon_type=WeaponType.Unguided,
|
||||
expend=Expend.All,
|
||||
direction=math.radians(dir),
|
||||
altitude=round(self.flight.coalition.doctrine.ingress_altitude.meters),
|
||||
altitude=waypoint.alt,
|
||||
)
|
||||
task.params["altitudeEnabled"] = False
|
||||
waypoint.tasks.append(task)
|
||||
|
||||
@ -5,7 +5,7 @@ from dcs.planes import B_17G, B_52H, Tu_22M3, B_1B
|
||||
from dcs.point import MovingPoint
|
||||
from dcs.task import Bombing, Expend, OptFormation, WeaponType, CarpetBombing
|
||||
|
||||
from game.utils import mach
|
||||
from game.utils import mach, meters
|
||||
from .pydcswaypointbuilder import PydcsWaypointBuilder
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ class StrikeIngressBuilder(PydcsWaypointBuilder):
|
||||
weapon_type=WeaponType.Bombs,
|
||||
expend=Expend.All,
|
||||
carpet_length=avg_spacing,
|
||||
altitude=round(self.flight.coalition.doctrine.ingress_altitude.meters),
|
||||
altitude=waypoint.alt,
|
||||
)
|
||||
waypoint.tasks.append(bombing)
|
||||
|
||||
@ -53,8 +53,7 @@ class StrikeIngressBuilder(PydcsWaypointBuilder):
|
||||
bombing.params["expend"] = Expend.All.value
|
||||
waypoint.tasks.append(bombing)
|
||||
|
||||
doctrine = self.flight.coalition.doctrine
|
||||
waypoint.speed = mach(0.85, doctrine.ingress_altitude).meters_per_second
|
||||
waypoint.speed = mach(0.85, meters(waypoint.alt)).meters_per_second
|
||||
|
||||
# Register special waypoints
|
||||
self.register_special_waypoints(self.waypoint.targets)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user