Skip to content

Commit

Permalink
npc: only report attitude changes that the avatar can see
Browse files Browse the repository at this point in the history
Simple fix to stop the player from seeing attitude changes for
NPCs that the avatar cannot see.
  • Loading branch information
mlangsdorf committed Feb 10, 2020
1 parent 84c1209 commit 56851a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/npc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3149,7 +3149,7 @@ void npc::set_attitude( npc_attitude new_attitude )
name, npc_attitude_id( attitude ), npc_attitude_id( new_attitude ) );
attitude_group new_group = get_attitude_group( new_attitude );
attitude_group old_group = get_attitude_group( attitude );
if( new_group != old_group && !is_fake() ) {
if( new_group != old_group && !is_fake() && g->u.sees( *this ) ) {
switch( new_group ) {
case attitude_group::hostile:
add_msg_if_npc( m_bad, _( "<npcname> gets angry!" ) );
Expand Down

0 comments on commit 56851a6

Please sign in to comment.