1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

CPathfinder: get rid of curPos and pass on initializeGraph

This commit is contained in:
ArseniyShestakov
2015-10-26 20:17:10 +03:00
parent 68bd37aa45
commit 01257efc02
2 changed files with 12 additions and 13 deletions

View File

@@ -301,7 +301,6 @@ private:
std::vector<int3> neighbours;
int3 curPos;
CGPathNode *cp; //current (source) path node -> we took it from the queue
CGPathNode *dp; //destination node -> it's a neighbour of cp that we consider
const TerrainTile *ct, *dt; //tile info for both nodes
@@ -322,7 +321,7 @@ private:
bool checkDestinationTile();
CGPathNode::EAccessibility evaluateAccessibility(const TerrainTile *tinfo) const;
CGPathNode::EAccessibility evaluateAccessibility(const int3 &pos, const TerrainTile *tinfo) const;
bool canMoveBetween(const int3 &a, const int3 &b) const; //checks only for visitable objects that may make moving between tiles impossible, not other conditions (like tiles itself accessibility)
bool addTeleportTwoWay(const CGTeleport * obj) const;