Skip to content

Commit

Permalink
Merge pull request #18 from Taurenkey/jumpFix
Browse files Browse the repository at this point in the history
Fix jumping issue with non-flying paths
  • Loading branch information
awgil authored May 16, 2024
2 parents d7e1ef9 + f7dc588 commit b9b9dcb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions vnavmesh/Movement/FollowPath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,18 @@ public unsafe void Update()
OverrideAFK.ResetTimers();
_movement.Enabled = MovementAllowed;
_movement.DesiredPosition = Waypoints[0];
if (_movement.DesiredPosition.Y > player.Position.Y && !Service.Condition[Dalamud.Game.ClientState.Conditions.ConditionFlag.InFlight])
if (_movement.DesiredPosition.Y > player.Position.Y && !Service.Condition[Dalamud.Game.ClientState.Conditions.ConditionFlag.InFlight] && !IgnoreDeltaY) //Only do this bit if on a flying path
{
// walk->fly transition (TODO: reconsider?)
if (Service.Condition[Dalamud.Game.ClientState.Conditions.ConditionFlag.Mounted])
ExecuteJump(); // Spam jump to take off
else if (!IgnoreDeltaY)
_movement.Enabled = false; // Else if we're not in flight, don't move since the target is above us and we can't reach it
else
{
_movement.Enabled = false; // Don't move, since it'll just run on the spot
return;
}
}

_camera.Enabled = Service.Config.AlignCameraToMovement;
_camera.SpeedH = _camera.SpeedV = 360.Degrees();
_camera.DesiredAzimuth = Angle.FromDirectionXZ(_movement.DesiredPosition - player.Position) + 180.Degrees();
Expand Down

0 comments on commit b9b9dcb

Please sign in to comment.