From 56851a6144f814f507f3fb63cb834dfc07a61d55 Mon Sep 17 00:00:00 2001 From: Mark Langsdorf Date: Mon, 10 Feb 2020 14:40:41 -0600 Subject: [PATCH] npc: only report attitude changes that the avatar can see Simple fix to stop the player from seeing attitude changes for NPCs that the avatar cannot see. --- src/npc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/npc.cpp b/src/npc.cpp index 073b119cb658b..5a88fafd1c40e 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -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, _( " gets angry!" ) );