forked from liza/Questionable
Compare commits
No commits in common. "47d9f090a24a43cf4fb3cb60f9bc9f5f4397c4bf" and "0a49da168227c1ae50e86c4a89f45558eda73026" have entirely different histories.
47d9f090a2
...
0a49da1682
@ -1,5 +1,5 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>2.19</Version>
|
<Version>2.17</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -169,8 +169,6 @@ internal static class MoveTo
|
|||||||
private readonly Action _startAction;
|
private readonly Action _startAction;
|
||||||
private readonly Vector3 _destination;
|
private readonly Vector3 _destination;
|
||||||
private readonly MoveParams _moveParams;
|
private readonly MoveParams _moveParams;
|
||||||
private readonly bool _isUnderwaterInitially;
|
|
||||||
private bool _canRestart;
|
|
||||||
|
|
||||||
public MoveInternal(MoveParams moveParams,
|
public MoveInternal(MoveParams moveParams,
|
||||||
MovementController movementController,
|
MovementController movementController,
|
||||||
@ -215,7 +213,6 @@ internal static class MoveTo
|
|||||||
}
|
}
|
||||||
|
|
||||||
_moveParams = moveParams;
|
_moveParams = moveParams;
|
||||||
_canRestart = moveParams.RestartNavigation;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Start()
|
public bool Start()
|
||||||
@ -234,20 +231,13 @@ internal static class MoveTo
|
|||||||
if (movementStartedAt == DateTime.MaxValue || movementStartedAt.AddSeconds(2) >= DateTime.Now)
|
if (movementStartedAt == DateTime.MaxValue || movementStartedAt.AddSeconds(2) >= DateTime.Now)
|
||||||
return ETaskResult.StillRunning;
|
return ETaskResult.StillRunning;
|
||||||
|
|
||||||
if (_canRestart &&
|
if (_moveParams.RestartNavigation &&
|
||||||
Vector3.Distance(_clientState.LocalPlayer!.Position, _destination) >
|
Vector3.Distance(_clientState.LocalPlayer!.Position, _destination) >
|
||||||
(_moveParams.StopDistance ?? QuestStep.DefaultStopDistance) + 5f)
|
(_moveParams.StopDistance ?? QuestStep.DefaultStopDistance) + 5f)
|
||||||
{
|
{
|
||||||
_canRestart = false;
|
_logger.LogInformation("Looks like movement was interrupted, re-attempting to move");
|
||||||
if (_clientState.TerritoryType == _moveParams.TerritoryId)
|
_startAction();
|
||||||
{
|
return ETaskResult.StillRunning;
|
||||||
_logger.LogInformation("Looks like movement was interrupted, re-attempting to move");
|
|
||||||
_startAction();
|
|
||||||
return ETaskResult.StillRunning;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
_logger.LogInformation(
|
|
||||||
"Looks like movement was interrupted, do nothing since we're in a different territory now");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ETaskResult.TaskComplete;
|
return ETaskResult.TaskComplete;
|
||||||
|
Loading…
Reference in New Issue
Block a user