From 3552f9a79d6c3ea29b1fb694c6d6839704ca64af Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Thu, 11 Jan 2024 19:39:05 -0600 Subject: [PATCH] fix: NPCs no longer magically aware of explosives they can't see (#4097) --- src/npcmove.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/npcmove.cpp b/src/npcmove.cpp index 9569a31f099..b7ee6f6df0e 100644 --- a/src/npcmove.cpp +++ b/src/npcmove.cpp @@ -315,6 +315,10 @@ std::vector npc::find_dangerous_explosives() const continue; } + if( !sees( elem->position() ) ) { + continue; // We can't worry about what we can't see. + } + const explosion_iuse *actor = dynamic_cast( use->get_actor_ptr() ); const int safe_range = actor->explosion.safe_range(); -- 2.43.0