Skip to content

Commit

Permalink
fix map pos not reset during feature match #619
Browse files Browse the repository at this point in the history
  • Loading branch information
huiyadanli committed Sep 16, 2024
1 parent 6414210 commit 3e69e6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions BetterGenshinImpact/GameTask/AutoPathing/Navigation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ public static void WarmUp()
_isWarmUp = true;
}

public static void Reset()
{
EntireMap.Instance.SetPrevPosition(-1, -1);
}

public static Point2f GetPosition(ImageRegion imageRegion)
{
var greyMat = new Mat(imageRegion.SrcGreyMat, new Rect(62, 19, 212, 212));
Expand Down
1 change: 1 addition & 0 deletions BetterGenshinImpact/GameTask/AutoPathing/PathExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public async Task Pathing(PathingTask task)

await Delay(100, cts);
Navigation.WarmUp(); // 提前加载地图特征点
Navigation.Reset();

try
{
Expand Down

0 comments on commit 3e69e6c

Please sign in to comment.