diff --git a/src/locations.cpp b/src/locations.cpp index 9bcf7e33c260..044b9814a525 100644 --- a/src/locations.cpp +++ b/src/locations.cpp @@ -413,12 +413,15 @@ item_location_type vehicle_item_location::where() const detached_ptr vehicle_item_location::detach( item *it ) { - return veh->get_part_hack( hack_id ).remove_item( *it ); + detached_ptr ret = veh->get_part_hack( hack_id ).remove_item( *it ); + veh->invalidate_mass(); + return ret; } void vehicle_item_location::attach( detached_ptr &&obj ) { veh->get_part_hack( hack_id ).add_item( std::move( obj ) ); + veh->invalidate_mass(); } int vehicle_item_location::obtain_cost( const Character &ch, int qty, const item *it ) const