1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

CPathfinder: get rid of addNeighbours coord argument

This commit is contained in:
ArseniyShestakov 2015-11-16 19:36:15 +03:00
parent 8f72d73241
commit d524b4eabe
2 changed files with 4 additions and 4 deletions

View File

@ -107,7 +107,7 @@ void CPathfinder::calculatePaths()
}
//add accessible neighbouring nodes to the queue
addNeighbours(cp->coord);
addNeighbours();
for(auto & neighbour : neighbours)
{
dt = &gs->map->getTile(neighbour);
@ -186,11 +186,11 @@ void CPathfinder::calculatePaths()
} //queue loop
}
void CPathfinder::addNeighbours(const int3 & coord)
void CPathfinder::addNeighbours()
{
neighbours.clear();
std::vector<int3> tiles;
CPathfinderHelper::getNeighbours(gs, *ct, coord, tiles, boost::logic::indeterminate, cp->layer == ELayer::SAIL); // TODO: find out if we still need "limitCoastSailing" option
CPathfinderHelper::getNeighbours(gs, *ct, cp->coord, tiles, boost::logic::indeterminate, cp->layer == ELayer::SAIL); // TODO: find out if we still need "limitCoastSailing" option
if(isSourceVisitableObj())
{
for(int3 tile: tiles)

View File

@ -165,7 +165,7 @@ private:
const CGObjectInstance * ctObj, * dtObj;
CGPathNode::ENodeAction destAction;
void addNeighbours(const int3 & coord);
void addNeighbours();
void addTeleportExits();
bool isLayerTransitionPossible() const;