From c0fad7538e0d4fc60f75152d210c8734a09f92c6 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Sat, 27 Jul 2024 01:36:19 -0700 Subject: Add patch fixing NPCs failing to wield weapons from worn holsters. --- src-16_npcs-not-wielding-from-worn-holsters.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src-16_npcs-not-wielding-from-worn-holsters.patch (limited to 'src-16_npcs-not-wielding-from-worn-holsters.patch') 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 -- cgit v1.2.1