Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abandon camp fix #37976

Merged
merged 2 commits into from Feb 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/faction_camp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1557,21 +1557,19 @@ void basecamp::start_upgrade( const std::string &bldg, const point &dir,
void basecamp::abandon_camp()
{
validate_assignees();
npc_ptr random_guy;
for( npc_ptr &guy : overmap_buffer.get_companion_mission_npcs( 10 ) ) {
npc_companion_mission c_mission = guy->get_companion_mission();
if( c_mission.role_id != base_camps::id ) {
continue;
}
random_guy = guy;
const std::string return_msg = _( "responds to the emergency recall…" );
finish_return( *guy, false, return_msg, "menial", 0, true );
}
for( npc_ptr &guy : get_npcs_assigned() ) {
talk_function::stop_guard( *guy );
}
overmap_buffer.remove_camp( *this );
g->m.remove_submap_camp( random_guy->pos() );
g->m.remove_submap_camp( bb_pos );
add_msg( m_info, _( "You abandon %s." ), name );
}

Expand Down