Fix odd frontline unit spawns

* Modfied frontline vector to ensure start point stays outside of
  exclusion zone.  (Previously it could be up to 100m inside)

* Change randomization in offset distance from frontline to be based
  on a percentage of the unit type's fixed offset instead of the
  width of frontline.
  (Prevents units from being far from their expected distance from
  frontline)

* Change visualgen to use the same frontline vector calculation as the
  unit spawns
This commit is contained in:
walterroach
2020-11-28 18:43:32 -06:00
parent 55573bf40a
commit 29b894f8b0
4 changed files with 22 additions and 25 deletions

View File

@@ -54,4 +54,4 @@ def heading_sum(h, a) -> int:
return h
def opposite_heading(h):
return h+180
return heading_sum(h, 180)