fixed FOB generation

This commit is contained in:
Vasyl Horbachenko
2018-10-23 03:08:01 +03:00
parent e9d7ee51f3
commit 911d57b415
2 changed files with 6 additions and 6 deletions

View File

@@ -27,9 +27,10 @@ class GroundObjectsGenerator:
center, heading = self.conflict.frontline_position(self.conflict.theater, self.conflict.from_cp, self.conflict.to_cp)
heading -= 90
position = self.conflict.find_ground_position(center.point_from_heading(heading, FARP_FRONTLINE_DISTANCE), heading)
initial_position = center.point_from_heading(heading, FARP_FRONTLINE_DISTANCE)
position = self.conflict.find_ground_position(initial_position, heading)
if not position:
return
position = initial_position
for i, _ in enumerate(range(0, number_of_units, self.FARP_CAPACITY)):
position = position.point_from_heading(0, i * 275)