Permalink
Browse files

YOU'RE TEARING ME APART, PATHFINDER

  • Loading branch information...
Warboy1982 committed Mar 11, 2018
1 parent d2394dd commit 330c21821b2b2e496c0a0e57bdbe1f6d7a29a70d
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Battlescape/Pathfinding.cpp
@@ -309,10 +309,10 @@ int Pathfinding::getTUCost(Position startPosition, int direction, Position *endP
if (direction < DIR_UP && startTile->getTerrainLevel() <= -16 && aboveDestination && !aboveDestination->hasNoFloor(destinationTile) && !triedStairs)
{
numberOfPartsGoingUp++;
verticalOffset.z++;
if (numberOfPartsGoingUp > size)
{
verticalOffset.z++;
endPosition->z++;
destinationTile = _save->getTile(*endPosition + offset);
belowDestination = _save->getTile(*endPosition + Position(x,y,-1));
@@ -344,7 +344,7 @@ int Pathfinding::getTUCost(Position startPosition, int direction, Position *endP
if (!destinationTile)
return 255;
if (direction < DIR_UP && endPosition->z == startTile->getPosition().z && numberOfPartsGoingUp == 0)
if (direction < DIR_UP && endPosition->z == startTile->getPosition().z)
{
// check if we can go this way
if (isBlocked(startTile, destinationTile, direction, target))

0 comments on commit 330c218

Please sign in to comment.