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

CPathfinder: separate teleporter exits and neighbour tile code

This way code that handle real neighbour tiles is more readable and teleport exits don't have to go via all checks they ignore anyway.
This commit is contained in:
ArseniyShestakov
2015-10-10 17:17:41 +03:00
parent f15065fdc5
commit 13c2b5e2d8
2 changed files with 41 additions and 27 deletions

View File

@@ -308,7 +308,8 @@ private:
void initializeGraph();
bool goodForLandSeaTransition(); //checks if current move will be between sea<->land. If so, checks it legality (returns false if movement is not possible) and sets useEmbarkCost
void getNeighbours(const int3 &coord, bool noTeleportExcludes = false);
void getNeighbours(const int3 &coord);
void getTeleportExits(bool noTeleportExcludes = false);
CGPathNode::EAccessibility evaluateAccessibility(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)