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:
parent
8f72d73241
commit
d524b4eabe
@ -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)
|
||||
|
@ -165,7 +165,7 @@ private:
|
||||
const CGObjectInstance * ctObj, * dtObj;
|
||||
CGPathNode::ENodeAction destAction;
|
||||
|
||||
void addNeighbours(const int3 & coord);
|
||||
void addNeighbours();
|
||||
void addTeleportExits();
|
||||
|
||||
bool isLayerTransitionPossible() const;
|
||||
|
Loading…
Reference in New Issue
Block a user