summaryrefslogtreecommitdiff
path: root/src-16_npcs-not-wielding-from-worn-holsters.patch
diff options
context:
space:
mode:
Diffstat (limited to 'src-16_npcs-not-wielding-from-worn-holsters.patch')
-rw-r--r--src-16_npcs-not-wielding-from-worn-holsters.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/src-16_npcs-not-wielding-from-worn-holsters.patch b/src-16_npcs-not-wielding-from-worn-holsters.patch
new file mode 100644
index 0000000..5173f86
--- /dev/null
+++ b/src-16_npcs-not-wielding-from-worn-holsters.patch
@@ -0,0 +1,11 @@
+--- a/src/npcmove.cpp
++++ b/src/npcmove.cpp
+@@ -3513,7 +3513,7 @@
+ // if they don't have a weapon with appropriate range/ammo.
+ visit_items( [&compare_weapon, this ]( item * node ) {
+ // For worn items, only compare if they have a weapon category defined.
+- if( is_worn( *node ) && node->type->weapon_category.empty() ) {
++ if( is_worn( *node ) && !( node->get_use( "holster" ) ) && node->type->weapon_category.empty() ) {
+ return VisitResponse::SKIP;
+ }
+ // Otherwise, compare any melee usable item, guns or holstered items