Fix some movement issues

This commit is contained in:
Liza 2024-07-23 00:38:16 +02:00
parent 0294c433de
commit 1ea5ae9e40
Signed by: liza
GPG Key ID: 7199F8D727D55F67
2 changed files with 17 additions and 4 deletions

View File

@ -12,12 +12,18 @@ internal sealed class MovementOverrideController
[ [
new BlacklistedArea(1191, new(-223.0412f, 31.937134f, -584.03906f), 5f, 7.75f), 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 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 // lotus stand
new BlacklistedPoint(205, new(26.75f, 0.5f, 20.75f), new(27.179117f, 0.26728272f, 19.714373f)), 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)), new BlacklistedPoint(132, new(45.5f, -8f, 101f), new(50.53978f, -8.046954f, 101.06045f)),
// ul'dah lamp near adventuer's guild // ul'dah lamp near adventuer's guild

View File

@ -65,7 +65,8 @@ internal static class Move
GameFunctions gameFunctions, GameFunctions gameFunctions,
IClientState clientState, IClientState clientState,
MovementController movementController, MovementController movementController,
TerritoryData territoryData) TerritoryData territoryData,
AetheryteData aetheryteData)
{ {
public QuestStep Step { get; set; } = null!; public QuestStep Step { get; set; } = null!;
public Vector3 Destination { get; set; } public Vector3 Destination { get; set; }
@ -91,8 +92,14 @@ internal static class Move
var position = clientState.LocalPlayer?.Position ?? new Vector3(); var position = clientState.LocalPlayer?.Position ?? new Vector3();
float actualDistance = (position - Destination).Length(); float actualDistance = (position - Destination).Length();
// this may otherwise sometimes skip a move step // if we teleport to a different zone, assume we always need to move; this is primarily relevant for cases
if (Step.AethernetShortcut != null || Step.AetheryteShortcut != null) // 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; actualDistance = float.MaxValue;
if (Step.Mount == true) if (Step.Mount == true)