mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
fix target reach check
This commit is contained in:
parent
ec4b836b3c
commit
958fc1d689
1 changed files with 1 additions and 1 deletions
|
|
@ -94,7 +94,7 @@ Route Pathfinding::perform(
|
|||
auto node = queue.top();
|
||||
queue.pop();
|
||||
|
||||
if (node.pos.x == end.x && node.pos.z == end.z) {
|
||||
if (node.pos.x == end.x && glm::abs((node.pos.y - end.y) / agent.height) == 0 && node.pos.z == end.z) {
|
||||
restore_route(route, node, parents);
|
||||
route.nodes.push_back({start});
|
||||
route.found = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue