From 8cdfd9c95f754d270143083a2d9f31ac89380f7a Mon Sep 17 00:00:00 2001 From: Kevin Granade Date: Tue, 3 May 2022 11:23:41 -0700 Subject: [PATCH] Fix opening and closing fake vehicle parts --- src/vehicle.cpp | 4 ++-- src/vehicle_use.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 5d342d3064a3a..8d37f1df6ee8a 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2700,7 +2700,7 @@ void vpart_position::set_label( const std::string &text ) const int vehicle::next_part_to_close( int p, bool outside ) const { - std::vector parts_here = parts_at_relative( parts[p].mount, true ); + std::vector parts_here = parts_at_relative( parts[p].mount, true, true ); // We want reverse, since we close the outermost thing first (curtains), and then the innermost thing (door) for( std::vector::reverse_iterator part_it = parts_here.rbegin(); @@ -2719,7 +2719,7 @@ int vehicle::next_part_to_close( int p, bool outside ) const int vehicle::next_part_to_open( int p, bool outside ) const { - std::vector parts_here = parts_at_relative( parts[p].mount, true ); + std::vector parts_here = parts_at_relative( parts[p].mount, true, true ); // We want forwards, since we open the innermost thing first (curtains), and then the innermost thing (door) for( const int &elem : parts_here ) { diff --git a/src/vehicle_use.cpp b/src/vehicle_use.cpp index 08c17c726d629..50cdeb2597818 100644 --- a/src/vehicle_use.cpp +++ b/src/vehicle_use.cpp @@ -1647,7 +1647,7 @@ bool vehicle::can_close( int part_index, Character &who ) void vehicle::open_all_at( int p ) { - std::vector parts_here = parts_at_relative( parts[p].mount, true ); + std::vector parts_here = parts_at_relative( parts[p].mount, true, true ); for( auto &elem : parts_here ) { if( part_flag( elem, VPFLAG_OPENABLE ) ) { // Note that this will open multi-square and non-multipart parts in the tile. This