mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-10 01:52:25 +00:00
Fix for swapped x and y returns on failure case for FindRoute
This commit is contained in:
parent
9c3e957d4e
commit
14d8683227
@ -152,15 +152,9 @@ PathfindingRoute PathfindingManager::FindRoute(const glm::vec3 &src_loc, const g
|
|||||||
ret.m_active = true;
|
ret.m_active = true;
|
||||||
|
|
||||||
if (!m_nav_mesh) {
|
if (!m_nav_mesh) {
|
||||||
PathfindingNode src;
|
|
||||||
src.flag = NavigationPolyFlagNormal;
|
|
||||||
src.position = current_location;
|
|
||||||
|
|
||||||
PathfindingNode dest;
|
PathfindingNode dest;
|
||||||
dest.flag = NavigationPolyFlagNormal;
|
dest.flag = NavigationPolyFlagNormal;
|
||||||
dest.position = dest_location;
|
dest.position = dest_loc;
|
||||||
|
|
||||||
ret.m_nodes.push_back(src);
|
|
||||||
ret.m_nodes.push_back(dest);
|
ret.m_nodes.push_back(dest);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -178,15 +172,9 @@ PathfindingRoute PathfindingManager::FindRoute(const glm::vec3 &src_loc, const g
|
|||||||
m_nav_query->findNearestPoly(&dest_location[0], &ext[0], &m_filter, &end_ref, 0);
|
m_nav_query->findNearestPoly(&dest_location[0], &ext[0], &m_filter, &end_ref, 0);
|
||||||
|
|
||||||
if (!start_ref || !end_ref) {
|
if (!start_ref || !end_ref) {
|
||||||
PathfindingNode src;
|
|
||||||
src.flag = NavigationPolyFlagNormal;
|
|
||||||
src.position = current_location;
|
|
||||||
|
|
||||||
PathfindingNode dest;
|
PathfindingNode dest;
|
||||||
dest.flag = NavigationPolyFlagNormal;
|
dest.flag = NavigationPolyFlagNormal;
|
||||||
dest.position = dest_location;
|
dest.position = dest_loc;
|
||||||
|
|
||||||
ret.m_nodes.push_back(src);
|
|
||||||
ret.m_nodes.push_back(dest);
|
ret.m_nodes.push_back(dest);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -225,15 +213,9 @@ PathfindingRoute PathfindingManager::FindRoute(const glm::vec3 &src_loc, const g
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
PathfindingNode src;
|
|
||||||
src.flag = NavigationPolyFlagNormal;
|
|
||||||
src.position = current_location;
|
|
||||||
|
|
||||||
PathfindingNode dest;
|
PathfindingNode dest;
|
||||||
dest.flag = NavigationPolyFlagNormal;
|
dest.flag = NavigationPolyFlagNormal;
|
||||||
dest.position = dest_location;
|
dest.position = dest_loc;
|
||||||
|
|
||||||
ret.m_nodes.push_back(src);
|
|
||||||
ret.m_nodes.push_back(dest);
|
ret.m_nodes.push_back(dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user