Attempt to fix diving movement issue v2.13
authorLiza Carvelli <liza@carvel.li>
Wed, 21 Aug 2024 18:33:40 +0000 (20:33 +0200)
committerLiza Carvelli <liza@carvel.li>
Wed, 21 Aug 2024 18:43:24 +0000 (20:43 +0200)
Directory.Build.targets
QuestPaths/6.x - Endwalker/Allied Societies/Arkasodara/Dailies/4573_Gathering Moss.json
Questionable/Controller/MovementController.cs
Questionable/Controller/Steps/Shared/MoveTo.cs
Questionable/Functions/GameFunctions.cs

index 7aba154f435c31117fae02fade1a5fb571f5f2ac..db4a3c20865220ae7d20cd091dcfb5394507e202 100644 (file)
@@ -1,5 +1,5 @@
 <Project>
     <PropertyGroup>
-        <Version>2.12</Version>
+        <Version>2.13</Version>
     </PropertyGroup>
 </Project>
index 380b35fe82b9d4a205a52aa876532f55c74db76f..06b876996f9f7949d208c2621215509897f03882 100644 (file)
             }
           }
         },
-        {
-          "Position": {
-            "X": 103.41005,
-            "Y": -23.878786,
-            "Z": 187.79831
-          },
-          "TerritoryId": 957,
-          "InteractionType": "WalkTo",
-          "DisableNavmesh": true
-        },
         {
           "DataId": 2012907,
           "Position": {
@@ -61,6 +51,7 @@
           },
           "TerritoryId": 957,
           "InteractionType": "Interact",
+          "DisableNavmesh": true,
           "CompletionQuestVariablesFlags": [
             null,
             null,
index 2f40a3beafc5d35124fdc29276023693965552ec..6809c9f1ecacb44d43e96222d113ca2e1cdac21d 100644 (file)
@@ -151,8 +151,9 @@ internal sealed class MovementController : IDisposable
 
         if (IsPathRunning && Destination != null)
         {
-            if (_gameFunctions.IsLoadingScreenVisible())
+            if (_gameFunctions.IsLoadingScreenVisible(false))
             {
+                _logger.LogInformation("Stopping movement, loading screen visible");
                 Stop();
                 return;
             }
index 1ba43fdbca60e291f41598277ccaf18cc4a4c441..a24fb2f0964f889d6fdcb0579697364fa9af5cbe 100644 (file)
@@ -115,15 +115,6 @@ internal static class MoveTo
                 actualDistance = float.MaxValue;
             }
 
-            // In particular, MoveBuilder is used so early that it'll have the position when you're starting gathering,
-            // not when you're finished.
-            if (questId is SatisfactionSupplyNpcId)
-            {
-                logger.LogDebug("SatisfactionSupply: Changing distance to max, previous distance: {Distance}",
-                    actualDistance);
-                actualDistance = float.MaxValue;
-            }
-
             if (step.Mount == true)
                 yield return mountFactory.Mount(step.TerritoryId, Mount.EMountIf.Always);
             else if (step.Mount == false)
index 32b35ce7b74dd27da6112803a2fa2796f77a80ba..fda0c60d907f75525c4621ec19e6e7afcf77c735 100644 (file)
@@ -398,7 +398,7 @@ internal sealed unsafe class GameFunctions
         if (!_clientState.IsLoggedIn || _clientState.LocalPlayer == null)
             return true;
 
-        if (IsLoadingScreenVisible())
+        if (IsLoadingScreenVisible(true))
             return true;
 
         if (_condition[ConditionFlag.Crafting])
@@ -437,16 +437,19 @@ internal sealed unsafe class GameFunctions
                flags.Contains(ConditionFlag.OccupiedInQuestEvent);
     }
 
-    public bool IsLoadingScreenVisible()
+    public bool IsLoadingScreenVisible(bool all)
     {
-        if (_gameGui.TryGetAddonByName("FadeMiddle", out AtkUnitBase* fade) && fade->IsVisible)
+        if (_gameGui.TryGetAddonByName("FadeMiddle", out AtkUnitBase* fade) && LAddon.IsAddonReady(fade) && fade->IsVisible)
             return true;
 
-        if (_gameGui.TryGetAddonByName("FadeBack", out fade) && fade->IsVisible)
-            return true;
+        if (all)
+        {
+            if (_gameGui.TryGetAddonByName("FadeBack", out fade) && LAddon.IsAddonReady(fade) && fade->IsVisible)
+                return true;
 
-        if (_gameGui.TryGetAddonByName("NowLoading", out fade) && fade->IsVisible)
-            return true;
+            if (_gameGui.TryGetAddonByName("NowLoading", out fade) && LAddon.IsAddonReady(fade) && fade->IsVisible)
+                return true;
+        }
 
         return false;
     }