mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix planning error in CAP-builder if no enemy airfields left
This commit is contained in:
parent
7ea144e7c7
commit
164873d3b1
@ -34,6 +34,11 @@ class CapBuilder(IBuilder[FlightPlanT, LayoutT], ABC):
|
||||
if airfield.captured != self.is_player:
|
||||
closest_airfield = airfield
|
||||
break
|
||||
else:
|
||||
for airfield in closest_cache.closest_airfields:
|
||||
if airfield.captured != self.is_player:
|
||||
closest_airfield = airfield
|
||||
break
|
||||
else:
|
||||
raise PlanningError("Could not find any enemy airfields")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user