muffin v7.5.1
This commit is contained in:
parent
a6481e7b9a
commit
965a736f84
59 changed files with 4112 additions and 5059 deletions
|
|
@ -415,7 +415,7 @@ internal sealed class CombatController : IDisposable
|
|||
return (Priority: 90, Reason: "KED");
|
||||
}
|
||||
Dalamud.Game.ClientState.Objects.Enums.BattleNpcSubKind battleNpcKind = battleNpc.BattleNpcKind;
|
||||
if ((battleNpcKind == Dalamud.Game.ClientState.Objects.Enums.BattleNpcSubKind.BattleNpcPart || battleNpcKind == Dalamud.Game.ClientState.Objects.Enums.BattleNpcSubKind.Enemy) ? true : false)
|
||||
if ((battleNpcKind == Dalamud.Game.ClientState.Objects.Enums.BattleNpcSubKind.BNpcPart || battleNpcKind == Dalamud.Game.ClientState.Objects.Enums.BattleNpcSubKind.Combatant) ? true : false)
|
||||
{
|
||||
uint namePlateIconId = address->NamePlateIconId;
|
||||
if ((namePlateIconId == 60093 || namePlateIconId == 60732) ? true : false)
|
||||
|
|
|
|||
|
|
@ -139,11 +139,11 @@ internal sealed class MovementController : IDisposable
|
|||
get
|
||||
{
|
||||
Task<List<Vector3>> pathfindTask = _pathfindTask;
|
||||
if (pathfindTask != null)
|
||||
if (pathfindTask == null || pathfindTask.IsCompleted)
|
||||
{
|
||||
return !pathfindTask.IsCompleted;
|
||||
return _navmeshIpc.IsSimpleMovePathfindInProgress;
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -473,34 +473,20 @@ internal sealed class MovementController : IDisposable
|
|||
to = vector;
|
||||
}
|
||||
PrepareNavigation(type, dataId, to, fly, sprint, stopDistance, verticalStopDistance ?? 1.95f, land, useNavmesh: true);
|
||||
_logger.LogInformation("Pathfinding to {Destination}", Destination);
|
||||
_logger.LogInformation("Pathfinding to {Destination} via SimpleMove", Destination);
|
||||
Destination.NavmeshCalculations++;
|
||||
_cancellationTokenSource = new CancellationTokenSource();
|
||||
_cancellationTokenSource.CancelAfter(TimeSpan.FromSeconds(30L));
|
||||
Vector3 vector2 = _objectTable[0]?.Position ?? Vector3.Zero;
|
||||
if (fly && _aetheryteData.CalculateDistance(vector2, _clientState.TerritoryType, EAetheryteLocation.CoerthasCentralHighlandsCampDragonhead) < 11f)
|
||||
float range = stopDistance ?? 2.8f;
|
||||
if (!_navmeshIpc.SimplePathfindAndMoveCloseTo(to, fly, range))
|
||||
{
|
||||
Vector3 vector = vector2;
|
||||
vector.Y = vector2.Y + 1f;
|
||||
vector2 = vector;
|
||||
_logger.LogInformation("Using modified start position for flying pathfinding: {StartPosition}", vector2.ToString("G", CultureInfo.InvariantCulture));
|
||||
}
|
||||
else if (fly)
|
||||
{
|
||||
Vector3 vector = vector2;
|
||||
vector.Y = vector2.Y + 0.2f;
|
||||
vector2 = vector;
|
||||
}
|
||||
_pathfindStartTime = Environment.TickCount64;
|
||||
if (fly && land)
|
||||
{
|
||||
_logger.LogInformation("Using tolerance-based pathfinding for landing (tolerance: 5.0)");
|
||||
_pathfindTask = _navmeshIpc.PathfindWithTolerance(vector2, to, fly, 5f, _cancellationTokenSource.Token);
|
||||
}
|
||||
else
|
||||
{
|
||||
_pathfindTask = _navmeshIpc.Pathfind(vector2, to, fly, _cancellationTokenSource.Token);
|
||||
_logger.LogWarning("SimpleMove rejected pathfind request (already in progress), stopping first");
|
||||
_navmeshIpc.Stop();
|
||||
if (!_navmeshIpc.SimplePathfindAndMoveCloseTo(to, fly, range))
|
||||
{
|
||||
_logger.LogWarning("SimpleMove still rejected after stop");
|
||||
}
|
||||
}
|
||||
MovementStartedAt = DateTime.Now;
|
||||
StartPlayerInputTracking();
|
||||
}
|
||||
|
||||
public void NavigateTo(EMovementType type, uint? dataId, List<Vector3> to, bool fly, bool sprint, float? stopDistance, float? verticalStopDistance = null, bool land = false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue