Skip to content
Permalink
Browse files

fix smoke pathing

  • Loading branch information
Warboy1982 committed Jan 27, 2018
1 parent 2eaaf48 commit c3ea24466358fbf205840634517b90d31c3dda40
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Battlescape/Pathfinding.cpp
@@ -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;
}

0 comments on commit c3ea244

Please sign in to comment.
You can’t perform that action at this time.