Skip to content

Commit

Permalink
Merge pull request #76396 from ShnitzelX2/fast-travel-fix
Browse files Browse the repository at this point in the history
Fixes fast travel overmap UI when failing to reach destination
  • Loading branch information
Maleclypse authored Sep 13, 2024
2 parents 2473620 + c3d5b83 commit 0221f6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/activity_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2929,7 +2929,8 @@ void activity_handlers::travel_do_turn( player_activity *act, Character *you )
const activity_id act_travel = ACT_TRAVELLING;
you->set_destination( route_to, player_activity( act_travel ) );
} else {
you->add_msg_if_player( _( "You cannot reach that destination" ) );
you->add_msg_if_player( m_warning, _( "You cannot reach that destination." ) );
ui::omap::force_quit();
}
} else {
you->add_msg_if_player( m_info, _( "You have reached your destination." ) );
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle_autodrive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1377,7 +1377,7 @@ autodrive_result vehicle::do_autodrive( Character &driver )
std::optional<navigation_step> next_step = active_autodrive_controller->compute_next_step();
if( !next_step ) {
// message handles pathfinding failure either due to obstacles or inability to see
driver.add_msg_if_player( _( "Can't see a path forward." ) );
driver.add_msg_if_player( m_warning, _( "Can't see a path forward." ) );
stop_autodriving( false );
return autodrive_result::abort;
}
Expand Down

0 comments on commit 0221f6e

Please sign in to comment.