Skip to content

Commit

Permalink
Travel: Allow bots to calculate distances across maps again
Browse files Browse the repository at this point in the history
  • Loading branch information
mostlikely4r committed Jan 13, 2025
1 parent c50a28f commit a3dcd16
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions playerbot/TravelMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2110,10 +2110,11 @@ void TravelMgr::AddMapTransfer(WorldPosition start, WorldPosition end, float por
void TravelMgr::LoadMapTransfers()
{
for (auto& node : sTravelNodeMap.getNodes())
for (auto& startNode : sTravelNodeMap.getNodes())
{
for (auto& [node, path] : *node->getLinks())
for (auto& [endNode, path] : *startNode->getLinks())
{
AddMapTransfer(*node->getPosition(), *node->getPosition(), path->getDistance());
AddMapTransfer(*startNode->getPosition(), *endNode->getPosition(), path->getDistance());
}
}
}
Expand Down

0 comments on commit a3dcd16

Please sign in to comment.