muffin v7.5.13
This commit is contained in:
parent
911ed68baa
commit
acf3e3cb18
69 changed files with 2731 additions and 1425 deletions
|
|
@ -7,10 +7,64 @@ namespace Questionable.Controller.Steps.Movement;
|
|||
internal sealed record MoveTask(ushort TerritoryId, Vector3 Destination, bool? Mount = null, bool MountRequired = false, bool DismountRequired = false, float? StopDistance = null, uint? DataId = null, bool DisableNavmesh = false, bool? Sprint = null, bool Fly = false, bool Land = false, bool IgnoreDistanceToObject = false, bool RestartNavigation = true, EInteractionType InteractionType = EInteractionType.None, bool SmartNavRouted = false, bool AllowZoneTransition = false, string? RouteTargetNodeId = null, string? RouteApproachNodeId = null) : ITask
|
||||
{
|
||||
public MoveTask(QuestStep step, Vector3 destination)
|
||||
: this(step.TerritoryId, destination, step.Mount, step.MountRequired, step.DismountRequired, step.CalculateActualStopDistance(), step.DataId, step.DisableNavmesh, step.Sprint, step.Fly == true, step.Land == true, step.IgnoreDistanceToObject == true, step.RestartNavigationIfCancelled != false, step.InteractionType)
|
||||
: this(step.TerritoryId, destination, ResolveMount(step), step.MountRequired, step.DismountRequired, step.CalculateActualStopDistance(), step.DataId, step.DisableNavmesh, step.Sprint, ResolveFly(step), ResolveLand(step), step.IgnoreDistanceToObject == true, step.RestartNavigationIfCancelled != false, step.InteractionType)
|
||||
{
|
||||
}
|
||||
|
||||
private static bool? ResolveMount(QuestStep step)
|
||||
{
|
||||
if (step.MountRequired)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (step.DismountRequired)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
switch (step.TravelMode)
|
||||
{
|
||||
case ETravelMode.OnFoot:
|
||||
return false;
|
||||
case ETravelMode.GroundMount:
|
||||
case ETravelMode.Flying:
|
||||
return true;
|
||||
default:
|
||||
return step.Mount;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool ResolveFly(QuestStep step)
|
||||
{
|
||||
if (step.DismountRequired)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
switch (step.TravelMode)
|
||||
{
|
||||
case ETravelMode.OnFoot:
|
||||
case ETravelMode.GroundMount:
|
||||
return false;
|
||||
case ETravelMode.Flying:
|
||||
return true;
|
||||
default:
|
||||
return step.Fly == true;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool ResolveLand(QuestStep step)
|
||||
{
|
||||
ETravelMode travelMode = step.TravelMode;
|
||||
bool flag = (uint)(travelMode - 1) <= 1u;
|
||||
bool flag2 = !flag;
|
||||
if (flag2)
|
||||
{
|
||||
EArrivalMode arrivalMode = step.ArrivalMode;
|
||||
bool flag3 = (uint)(arrivalMode - 2) <= 1u;
|
||||
flag2 = flag3 || step.Land == true;
|
||||
}
|
||||
return flag2;
|
||||
}
|
||||
|
||||
public bool ShouldRedoOnInterrupt()
|
||||
{
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue