minor bugfixes

This commit is contained in:
Vasyl Horbachenko 2018-09-11 05:55:05 +03:00
parent 12853feec3
commit afb084ebf8
5 changed files with 12 additions and 6 deletions

View File

@ -3,6 +3,7 @@ import logging
from dcs.unittype import UnitType
from dcs.task import *
from dcs.vehicles import AirDefence
from dcs.unittype import UnitType
from game import *

View File

@ -70,7 +70,7 @@ class FrontlinePatrolEvent(Event):
op.setup(cas=assigned_units_from(self.cas),
escort=assigned_units_from(self.escort),
interceptors=flights[CAP],
armor_attackers=db.unitdict_restrict_count(dict_from_flight(flights[PinpointStrike]), sum(defenders.values())),
armor_attackers=db.unitdict_restrict_count(db.unitdict_from(flights[PinpointStrike]), sum(defenders.values())),
armor_defenders=defenders)
self.operation = op

View File

@ -86,9 +86,9 @@ class Operation:
# air support
self.airsupportgen.generate(self.is_awacs_enabled)
self.briefinggen.append_frequency("Tanker", "10X/240 MHz FM")
self.briefinggen.append_frequency("Tanker", "10X/131 MHz AM")
if self.is_awacs_enabled:
self.briefinggen.append_frequency("AWACS", "244 MHz FM")
self.briefinggen.append_frequency("AWACS", "133 MHz AM")
# ground infrastructure
self.groundobjectgen.generate()
@ -111,8 +111,10 @@ class Operation:
else:
self.envgen.load(self.environment_settings)
# @TODO: ADD WAYPOINT INFORMATION!
# main frequencies
self.briefinggen.append_frequency("Flight", "251 MHz FM")
self.briefinggen.append_frequency("Flight", "251 MHz AM")
if self.conflict.from_cp.is_global or self.conflict.to_cp.is_global:
self.briefinggen.append_frequency("Carrier", "20X/ICLS CHAN1")

View File

@ -33,7 +33,7 @@ class AirSupportConflictGenerator:
plane_type=tanker_unit,
position=tanker_position,
altitude=TANKER_ALT,
frequency=240,
frequency=131,
start_type=StartType.Warm,
tacanchannel="99X",
)
@ -49,6 +49,6 @@ class AirSupportConflictGenerator:
altitude=AWACS_ALT,
airport=None,
position=self.conflict.position.random_point_within(AWACS_DISTANCE, AWACS_DISTANCE),
frequency=244,
frequency=133,
start_type=StartType.Warm,
)

View File

@ -79,6 +79,9 @@ class TriggersGenerator:
if player_cp.position.distance_to_point(group.position) > PUSH_TRIGGER_SIZE * 3:
continue
if group.units[0].is_human():
continue
regroup_heading = self.conflict.to_cp.position.heading_between_point(player_cp.position)
pos1 = group.position.point_from_heading(regroup_heading, REGROUP_ZONE_DISTANCE)