diff --git a/src/pathfinding.cpp b/src/pathfinding.cpp index d96b7621f668c..cc86f35c5b6b3 100644 --- a/src/pathfinding.cpp +++ b/src/pathfinding.cpp @@ -317,8 +317,8 @@ std::vector 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