Skip to content

Commit

Permalink
fix: two cases of NPCs printing messages in odd contexts (#4098)
Browse files Browse the repository at this point in the history
fix: fix two cases of NPCs printing messages in odd contexts
  • Loading branch information
chaosvolt authored Jan 12, 2024
1 parent 8cbed5f commit dea4a49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/npcmove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2365,7 +2365,10 @@ void npc::move_to( const tripoint &pt, bool no_bashing, std::set<tripoint> *nomo
// other npcs should not try to move into this npc anymore,
// so infinite loop can be avoided.
realnomove->insert( pos() );
say( "<let_me_pass>" );
// Don't spam player with messages over followers blunder into each other.
if( !np->is_following() ) {
say( "<let_me_pass>" );
}
np->move_away_from( pos(), true, realnomove );
// if we moved NPC, readjust their path, so NPCs don't jostle each other out of their activity paths.
if( np->attitude == NPCATT_ACTIVITY ) {
Expand Down
2 changes: 1 addition & 1 deletion src/sounds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ void sounds::process_sound_markers( player *p )
!p->has_effect( effect_narcosis ) ) {
//Not kidding about sleep-through-firefight
p->wake_up();
add_msg( m_warning, _( "Something is making noise." ) );
p->add_msg_if_player( m_warning, _( "Something is making noise." ) );
} else {
continue;
}
Expand Down

0 comments on commit dea4a49

Please sign in to comment.