Skip to content

Commit

Permalink
fix: NPCs no longer magically aware of explosives they can't see (#4097)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaosvolt authored Jan 12, 2024
1 parent 8ccee48 commit 3552f9a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/npcmove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,10 @@ std::vector<sphere> 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<const explosion_iuse *>( use->get_actor_ptr() );
const int safe_range = actor->explosion.safe_range();

Expand Down

0 comments on commit 3552f9a

Please sign in to comment.