From 8856eb61535cd28a64dc8e14bfcbd7e6a6a9f5bb Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Mon, 31 Mar 2025 02:02:23 +0200 Subject: [PATCH] Shorten necessary sprint distance in certain areas (e.g. towns) --- Questionable.Model/Questing/EStatus.cs | 1 + Questionable/Controller/MovementController.cs | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Questionable.Model/Questing/EStatus.cs b/Questionable.Model/Questing/EStatus.cs index 780f1a4e..00919e18 100644 --- a/Questionable.Model/Questing/EStatus.cs +++ b/Questionable.Model/Questing/EStatus.cs @@ -9,4 +9,5 @@ public enum EStatus : uint GatheringRateUp = 218, Hidden = 614, Eukrasia = 2606, + Jog = 4209, } diff --git a/Questionable/Controller/MovementController.cs b/Questionable/Controller/MovementController.cs index 3bdfecb4..bc9909e2 100644 --- a/Questionable/Controller/MovementController.cs +++ b/Questionable/Controller/MovementController.cs @@ -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"); -- 2.30.2