Skip to content

Commit

Permalink
fix smoke pathing
Browse files Browse the repository at this point in the history
  • Loading branch information
Warboy1982 committed Jan 27, 2018
1 parent 2eaaf48 commit c3ea244
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Battlescape/Pathfinding.cpp
Expand Up @@ -445,8 +445,8 @@ int Pathfinding::getTUCost(Position startPosition, int direction, Position *endP
destinationTile->getFire() > 0)
cost += 32; // try to find a better path, but don't exclude this path entirely.

// TFTD thing: tiles on fire are cost 2 TUs more for whatever reason.
if (_save->getDepth() > 0 && destinationTile->getFire() > 0)
// TFTD thing: underwater tiles on fire or filled with smoke cost 2 TUs more for whatever reason.
if (_save->getDepth() > 0 && (destinationTile->getFire() > 0 || destinationTile->getSmoke() > 0))
{
cost += 2;
}
Expand Down

0 comments on commit c3ea244

Please sign in to comment.