Fix some movement issues
authorLiza Carvelli <liza@carvel.li>
Mon, 22 Jul 2024 22:38:16 +0000 (00:38 +0200)
committerLiza Carvelli <liza@carvel.li>
Mon, 22 Jul 2024 22:38:16 +0000 (00:38 +0200)
Questionable/Controller/NavigationOverrides/MovementOverrideController.cs
Questionable/Controller/Steps/Shared/Move.cs

index ee46f639f663b13bd5e954580370c81987ba33e3..87ec23bf50072353ce81914555de758a5e07575a 100644 (file)
@@ -12,12 +12,18 @@ internal sealed class MovementOverrideController
     [
         new BlacklistedArea(1191, new(-223.0412f, 31.937134f, -584.03906f), 5f, 7.75f),
 
-        // New Gridania Navmesh workaround
+        // limsa, aftcastle to baderon
         new BlacklistedPoint(128, new(2f, 40.25f, 36.5f), new(0.25f, 40.25f, 36.5f)),
 
+        // New Gridania, Carline Canopy stairs
+        new BlacklistedPoint(132, new(29, -8, 120.5f), new(28.265165f, -8.000001f, 120.149734f)),
+        new BlacklistedPoint(132, new(28.25f, -8, 125), new(27.372725f, -8.200001f, 125.55859f)),
+        new BlacklistedPoint(132, new(32.25f, -8, 126.5f), new(32.022232f, -8.200011f, 126.86095f)),
+
         // lotus stand
         new BlacklistedPoint(205, new(26.75f, 0.5f, 20.75f), new(27.179117f, 0.26728272f, 19.714373f)),
 
+        // New Gridania Navmesh workaround - planter box outside the Carline Canopy
         new BlacklistedPoint(132, new(45.5f, -8f, 101f), new(50.53978f, -8.046954f, 101.06045f)),
 
         // ul'dah lamp near adventuer's guild
index 1abbd4eea5281555460490827c9de9da50ede612..e74746881e0d4841ade914e2fcec21c085c8473d 100644 (file)
@@ -65,7 +65,8 @@ internal static class Move
         GameFunctions gameFunctions,
         IClientState clientState,
         MovementController movementController,
-        TerritoryData territoryData)
+        TerritoryData territoryData,
+        AetheryteData aetheryteData)
     {
         public QuestStep Step { get; set; } = null!;
         public Vector3 Destination { get; set; }
@@ -91,8 +92,14 @@ internal static class Move
             var position = clientState.LocalPlayer?.Position ?? new Vector3();
             float actualDistance = (position - Destination).Length();
 
-            // this may otherwise sometimes skip a move step
-            if (Step.AethernetShortcut != null || Step.AetheryteShortcut != null)
+            // if we teleport to a different zone, assume we always need to move; this is primarily relevant for cases
+            // where you're e.g. in Lakeland, and the step navigates via Crystarium → Tesselation back into the same
+            // zone.
+            //
+            // Side effects of this check being broken include:
+            //   - mounting when near the target npc (if you spawn close enough for the next step)
+            //   - trying to fly when near the target npc (if close enough where no movement is required)
+            if (Step.AetheryteShortcut != null && aetheryteData.TerritoryIds[Step.AetheryteShortcut.Value] != Step.TerritoryId)
                 actualDistance = float.MaxValue;
 
             if (Step.Mount == true)