mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Don't exclude BARCAP targets from culling.
Fixes https://github.com/Khopa/dcs_liberation/issues/597 (cherry picked from commit b9ade2295e0b4401480486304023d76cf0da1b81)
This commit is contained in:
parent
44b5f5a919
commit
10b74e507f
15
game/game.py
15
game/game.py
@ -1,3 +1,4 @@
|
|||||||
|
import itertools
|
||||||
import logging
|
import logging
|
||||||
import random
|
import random
|
||||||
import sys
|
import sys
|
||||||
@ -19,6 +20,7 @@ from gen.ato import AirTaskingOrder
|
|||||||
from gen.conflictgen import Conflict
|
from gen.conflictgen import Conflict
|
||||||
from gen.flights.ai_flight_planner import CoalitionMissionPlanner
|
from gen.flights.ai_flight_planner import CoalitionMissionPlanner
|
||||||
from gen.flights.closestairfields import ObjectiveDistanceCache
|
from gen.flights.closestairfields import ObjectiveDistanceCache
|
||||||
|
from gen.flights.flight import FlightType
|
||||||
from gen.ground_forces.ai_ground_planner import GroundPlanner
|
from gen.ground_forces.ai_ground_planner import GroundPlanner
|
||||||
from . import persistency
|
from . import persistency
|
||||||
from .debriefing import Debriefing
|
from .debriefing import Debriefing
|
||||||
@ -391,9 +393,16 @@ class Game:
|
|||||||
if cpoint is not None:
|
if cpoint is not None:
|
||||||
points.append(cpoint)
|
points.append(cpoint)
|
||||||
|
|
||||||
for package in self.blue_ato.packages:
|
packages = itertools.chain(self.blue_ato.packages,
|
||||||
points.append(package.target.position)
|
self.red_ato.packages)
|
||||||
for package in self.red_ato.packages:
|
for package in packages:
|
||||||
|
if package.primary_task is FlightType.BARCAP:
|
||||||
|
# BARCAPs will be planned at most locations on smaller theaters,
|
||||||
|
# rendering culling fairly useless. BARCAP packages don't really
|
||||||
|
# need the ground detail since they're defensive. SAMs nearby
|
||||||
|
# are only interesting if there are enemies in the area, and if
|
||||||
|
# there are they won't be culled because of the enemy's mission.
|
||||||
|
continue
|
||||||
points.append(package.target.position)
|
points.append(package.target.position)
|
||||||
|
|
||||||
# Else 0,0, since we need a default value
|
# Else 0,0, since we need a default value
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user