diff --git a/src/npctalk.cpp b/src/npctalk.cpp index d700556fa3eef..e61384eecd1aa 100644 --- a/src/npctalk.cpp +++ b/src/npctalk.cpp @@ -726,20 +726,6 @@ void npc::talk_to_u( bool text_only, bool radio_contact ) most_difficult_mission = type.difficulty; } } - if( chatbin.mission_selected != nullptr ) { - if( chatbin.mission_selected->get_assigned_player_id() != g->u.getID() ) { - // Don't talk about a mission that is assigned to someone else. - chatbin.mission_selected = nullptr; - } - } - if( chatbin.mission_selected == nullptr ) { - // if possible, select a mission to talk about - if( !chatbin.missions.empty() ) { - chatbin.mission_selected = chatbin.missions.front(); - } else if( !d.missions_assigned.empty() ) { - chatbin.mission_selected = d.missions_assigned.front(); - } - } // Needs if( has_effect( effect_npc_suspend ) ) { @@ -785,6 +771,20 @@ void npc::talk_to_u( bool text_only, bool radio_contact ) d_win.open_dialogue( text_only ); // Main dialogue loop do { + if( chatbin.mission_selected != nullptr ) { + if( chatbin.mission_selected->get_assigned_player_id() != g->u.getID() ) { + // Don't talk about a mission that is assigned to someone else. + chatbin.mission_selected = nullptr; + } + } + if( chatbin.mission_selected == nullptr ) { + // if possible, select a mission to talk about + if( !chatbin.missions.empty() ) { + chatbin.mission_selected = chatbin.missions.front(); + } else if( !d.missions_assigned.empty() ) { + chatbin.mission_selected = d.missions_assigned.front(); + } + } d_win.print_header( name ); const talk_topic next = d.opt( d_win, d.topic_stack.back() ); if( next.id == "TALK_NONE" ) { diff --git a/src/npctalk_funcs.cpp b/src/npctalk_funcs.cpp index 57ab1a431aa67..9b3ce092d3858 100644 --- a/src/npctalk_funcs.cpp +++ b/src/npctalk_funcs.cpp @@ -145,6 +145,9 @@ void talk_function::clear_mission( npc &p ) } if( miss->has_follow_up() ) { p.add_new_mission( mission::reserve_new( miss->get_follow_up(), p.getID() ) ); + if( !p.chatbin.mission_selected ) { + p.chatbin.mission_selected = p.chatbin.missions.front(); + } } }