diff --git a/src/overmap_ui.cpp b/src/overmap_ui.cpp index d7999d768e73c..9af3ee84b407c 100644 --- a/src/overmap_ui.cpp +++ b/src/overmap_ui.cpp @@ -1483,7 +1483,13 @@ static tripoint display( const tripoint &orig, const draw_data_t &data = draw_da } const tripoint player_omt_pos = g->u.global_omt_location(); if( !g->u.omt_path.empty() && g->u.omt_path.front() == curs ) { - if( query_yn( _( "Travel to this point?" ) ) ) { + std::string confirm_msg; + if( g->u.weight_carried() > g->u.weight_capacity() ) { + confirm_msg = _( "You are overburdened, are you sure you want to travel (it may be painful)?" ); + } else { + confirm_msg = _( "Travel to this point?" ); + } + if( query_yn( confirm_msg ) ) { // renew the path incase of a leftover dangling path point g->u.omt_path = overmap_buffer.get_npc_path( player_omt_pos, curs, ptype ); if( g->u.in_vehicle && g->u.controlling_vehicle ) { diff --git a/src/player_activity.cpp b/src/player_activity.cpp index 81c96a815a217..5c7b46bc5c969 100644 --- a/src/player_activity.cpp +++ b/src/player_activity.cpp @@ -159,11 +159,18 @@ void player_activity::do_turn( player &p ) p.drop_invalid_inventory(); return; } - + const bool travel_activity = id() == ACT_TRAVELLING; // This might finish the activity (set it to null) type->call_do_turn( this, &p ); // Activities should never excessively drain stamina. - if( p.get_stamina() < previous_stamina && p.get_stamina() < p.get_stamina_max() / 3 ) { + // adjusted stamina because + // autotravel doesn't reduce stamina after do_turn() + // it just sets a destination, clears the activity, then moves afterwards + // so set stamina -1 if that is the case + // to simulate that the next step will surely use up some stamina anyway + // this is to ensure that resting will occur when travelling overburdened + const int adjusted_stamina = travel_activity ? p.get_stamina() - 1 : p.get_stamina(); + if( adjusted_stamina < previous_stamina && p.get_stamina() < p.get_stamina_max() / 3 ) { if( one_in( 50 ) ) { p.add_msg_if_player( _( "You pause for a moment to catch your breath." ) ); }