|
@@ -110,7 +110,7 @@ void CPathfinder::calculatePaths()
|
|
|
if(cp->layer != i && !isLayerTransitionPossible())
|
|
if(cp->layer != i && !isLayerTransitionPossible())
|
|
|
continue;
|
|
continue;
|
|
|
|
|
|
|
|
- if(!isMovementPossible())
|
|
|
|
|
|
|
+ if(!isMovementToDestPossible())
|
|
|
continue;
|
|
continue;
|
|
|
|
|
|
|
|
int cost = gs->getMovementCost(hero, cp->coord, dp->coord, movement);
|
|
int cost = gs->getMovementCost(hero, cp->coord, dp->coord, movement);
|
|
@@ -138,7 +138,7 @@ void CPathfinder::calculatePaths()
|
|
|
dp->turns = turnAtNextTile;
|
|
dp->turns = turnAtNextTile;
|
|
|
dp->theNodeBefore = cp;
|
|
dp->theNodeBefore = cp;
|
|
|
|
|
|
|
|
- if(checkDestinationTile())
|
|
|
|
|
|
|
+ if(isMovementAfterDestPossible())
|
|
|
mq.push_back(dp);
|
|
mq.push_back(dp);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -225,7 +225,7 @@ void CPathfinder::addTeleportExits(bool noTeleportExcludes)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-bool CPathfinder::isMovementPossible()
|
|
|
|
|
|
|
+bool CPathfinder::isMovementToDestPossible()
|
|
|
{
|
|
{
|
|
|
switch (dp->layer)
|
|
switch (dp->layer)
|
|
|
{
|
|
{
|
|
@@ -263,7 +263,7 @@ bool CPathfinder::isMovementPossible()
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-bool CPathfinder::checkDestinationTile()
|
|
|
|
|
|
|
+bool CPathfinder::isMovementAfterDestPossible()
|
|
|
{
|
|
{
|
|
|
if(dp->accessible == CGPathNode::ACCESSIBLE)
|
|
if(dp->accessible == CGPathNode::ACCESSIBLE)
|
|
|
return true;
|
|
return true;
|