diff --git a/src/activity_actor.cpp b/src/activity_actor.cpp index 9ba98d5029e9f..bec76ff8b82fa 100644 --- a/src/activity_actor.cpp +++ b/src/activity_actor.cpp @@ -1132,7 +1132,7 @@ std::unique_ptr hacksaw_activity_actor::deserialize( JsonValue & bikerack_racking_activity_actor::bikerack_racking_activity_actor( vehicle &parent_vehicle, std::vector> parts ) : parts( std::move( parts ) ) { - parent_vehicle_pos = parent_vehicle.pos_bub(); + parent_vehicle_pos = parent_vehicle.bub_part_pos( 0 ); } void bikerack_racking_activity_actor::start( player_activity &act, Character & ) @@ -1187,7 +1187,7 @@ bikerack_unracking_activity_actor::bikerack_unracking_activity_actor( vehicle &p std::vector parts, std::vector racks ) : parts( std::move( parts ) ), racks( std::move( racks ) ) { - parent_vehicle_pos = parent_vehicle.pos_bub(); + parent_vehicle_pos = parent_vehicle.bub_part_pos( 0 ); } void bikerack_unracking_activity_actor::start( player_activity &act, Character & ) diff --git a/src/handle_liquid.cpp b/src/handle_liquid.cpp index a266c2869a163..6da1d6bebe4f9 100644 --- a/src/handle_liquid.cpp +++ b/src/handle_liquid.cpp @@ -82,7 +82,7 @@ static void serialize_liquid_target( player_activity &act, const vpart_reference { act.values.push_back( static_cast( liquid_target_type::VEHICLE ) ); act.values.push_back( 0 ); // dummy - act.coords.push_back( vp.vehicle().global_pos3() ); + act.coords.push_back( vp.vehicle().global_part_pos3( 0 ) ); act.values.push_back( vp.part_index() ); // tank part index } diff --git a/src/vehicle.h b/src/vehicle.h index d487c92353645..c6154e5997e98 100644 --- a/src/vehicle.h +++ b/src/vehicle.h @@ -1214,7 +1214,9 @@ class vehicle // Returns the location of the vehicle in global overmap terrain coordinates. tripoint_abs_omt global_omt_location() const; // Returns the coordinates (in map squares) of the vehicle relative to the local map. + // Warning: Don't assume this position contains a vehicle part tripoint global_pos3() const; + // Warning: Don't assume this position contains a vehicle part tripoint_bub_ms pos_bub() const; /** * Get the coordinates of the studied part of the vehicle