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

CPathfinder: fix typos and more code cleanups

This commit is contained in:
ArseniyShestakov
2015-10-25 17:01:28 +03:00
parent 4f7c3ec60f
commit a536691781
2 changed files with 7 additions and 14 deletions

View File

@@ -284,7 +284,7 @@ private:
bool useFlying;
bool useWaterWalking;
bool useEmbarkAndDisembark;
bool useTeleportTWoWay; // Two-way monoliths and Subterranean Gate
bool useTeleportTwoWay; // Two-way monoliths and Subterranean Gate
bool useTeleportOneWay; // One-way monoliths with one known exit only
bool useTeleportOneWayRandom; // One-way monoliths with more than one known exit
bool useTeleportWhirlpool; // Force enabled if hero protected or unaffected (have one stack of one creature)
@@ -305,13 +305,9 @@ private:
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
const CGObjectInstance *sTileObj;
ui8 useEmbarkCost; //0 - usual movement; 1 - embark; 2 - disembark
CGObjectInstance *sTileObj;
CGObjectInstance *dTileObj;
const CGTeleport *sTileTeleport;
const CGTeleport *dTileTeleport;
CGPathNode *getNode(const int3 &coord);
void initializeGraph();
bool isMovementPossible(); //checks if current move will be between sea<->land. If so, checks it legality (returns false if movement is not possible) and sets useEmbarkCost