From 666b38982153ae0aa22c262b65890814292eceed Mon Sep 17 00:00:00 2001 From: docofmur <84192044+docofmur@users.noreply.github.com> Date: Thu, 24 Jun 2021 10:24:13 -0700 Subject: [PATCH] Fixes #1337 by making ground location search look in both directions (#1338) (cherry picked from commit a31432ad9ed89bc9fc2c2f67431b4106aec35b19) --- changelog.md | 3 ++- gen/conflictgen.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index cbdb1708..c12c365e 100644 --- a/changelog.md +++ b/changelog.md @@ -35,7 +35,8 @@ Saves from 3.x are not compatible with 4.0. * **[Mission Generation]** Fixed EWR group names so they contribute to Skynet again. * **[Mission Generation]** Fixed duplicate name error when generating convoys and cargo ships when creating manual transfers after loading a game. * **[Mission Generation]** Fixed empty convoys not being disbanded when all units are killed/removed. -* **[Mission Generation]** Fixed player losing frontline progress when skipping from turn 0 to turn 1. +* **[Mission Generation]** Fixed player losing frontline progress when skipping from turn 0 to turn 1. +* **[Mission Generation]** Fixed issue where frontline would only search to the right for valid locations. * **[UI]** Made non-interactive map elements less obstructive. * **[UI]** Added support for Neutral Dot difficulty label * **[UI]** Clear skies at night no longer described as "Sunny" by the weather widget. diff --git a/gen/conflictgen.py b/gen/conflictgen.py index d4b145d4..eabf4e4e 100644 --- a/gen/conflictgen.py +++ b/gen/conflictgen.py @@ -153,6 +153,8 @@ class Conflict: if theater.is_on_land(pos): return pos pos = initial.point_from_heading(opposite_heading(heading), distance) + if theater.is_on_land(pos): + return pos if coerce: pos = theater.nearest_land_pos(initial) return pos