Shorten necessary sprint distance in certain areas (e.g. towns)
authorLiza Carvelli <liza@carvel.li>
Mon, 31 Mar 2025 00:02:23 +0000 (02:02 +0200)
committerLiza Carvelli <liza@carvel.li>
Mon, 31 Mar 2025 00:02:23 +0000 (02:02 +0200)
Questionable.Model/Questing/EStatus.cs
Questionable/Controller/MovementController.cs

index 780f1a4..00919e1 100644 (file)
@@ -9,4 +9,5 @@ public enum EStatus : uint
     GatheringRateUp = 218,
     Hidden = 614,
     Eukrasia = 2606,
+    Jog = 4209,
 }
index 3bdfecb..bc9909e 100644 (file)
@@ -283,7 +283,15 @@ internal sealed class MovementController : IDisposable
                         unsafe
                         {
                             // 70 is ~10 seconds of sprint
-                            if (actualDistance > 100f &&
+                            float sprintDistance = 100f;
+
+                            // if we're in towns/event areas, jog is a neat fallback (if we're not already jogging,
+                            // if we're too close then sprinting will barely benefit us)
+                            if (!_gameFunctions.HasStatus(EStatus.Jog) &&
+                                GameMain.Instance()->CurrentTerritoryIntendedUseId is 0 or 7 or 13 or 14 or 15 or 19 or 23 or 29)
+                                sprintDistance = 30f;
+
+                            if (actualDistance > sprintDistance &&
                                 ActionManager.Instance()->GetActionStatus(ActionType.GeneralAction, 4) == 0)
                             {
                                 _logger.LogInformation("Triggering Sprint");