Skip to content

Commit

Permalink
Fix NPCs getting stuck trying to path in through a closed window (#51882
Browse files Browse the repository at this point in the history
) (#61272)
  • Loading branch information
jim-huynh authored Sep 27, 2022
1 parent 89e65dd commit ec4b0c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pathfinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ std::vector<tripoint> map::route( const tripoint &f, const tripoint &t,
// Climbing fences
newg += climb_cost;
} else if( doors && ( terrain.open || furniture.open ) &&
( !terrain.has_flag( ter_furn_flag::TFLAG_OPENCLOSE_INSIDE ) ||
!furniture.has_flag( ter_furn_flag::TFLAG_OPENCLOSE_INSIDE ) ||
( ( !terrain.has_flag( ter_furn_flag::TFLAG_OPENCLOSE_INSIDE ) &&
!furniture.has_flag( ter_furn_flag::TFLAG_OPENCLOSE_INSIDE ) ) ||
!is_outside( cur ) ) ) {
// Only try to open INSIDE doors from the inside
// To open and then move onto the tile
Expand Down

0 comments on commit ec4b0c1

Please sign in to comment.