fix: propagate parkour profiles through astar

This commit is contained in:
BruceChen 2026-04-18 16:14:04 +00:00
parent b4b0c6e8ed
commit 724880f928
2 changed files with 16 additions and 0 deletions

View file

@ -226,6 +226,7 @@ namespace MinecraftClient.Pathing.Core
neighbor.GCost = tentativeG;
neighbor.Parent = current;
neighbor.MoveUsed = move.Type;
neighbor.ParkourProfile = moveResult.ParkourProfile;
if (neighbor.IsOpen)
openSet.Update(neighbor);
}
@ -237,6 +238,7 @@ namespace MinecraftClient.Pathing.Core
HCost = goal.Heuristic(nx, ny, nz),
Parent = current,
MoveUsed = move.Type,
ParkourProfile = moveResult.ParkourProfile,
IsOpen = true
};
nodeMap[packed] = neighbor;