diff options
Diffstat (limited to 'revert-27_fix-NPCs-keep-their-splints-on-3589.patch')
-rw-r--r-- | revert-27_fix-NPCs-keep-their-splints-on-3589.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/revert-27_fix-NPCs-keep-their-splints-on-3589.patch b/revert-27_fix-NPCs-keep-their-splints-on-3589.patch new file mode 100644 index 0000000..3bf0731 --- /dev/null +++ b/revert-27_fix-NPCs-keep-their-splints-on-3589.patch @@ -0,0 +1,30 @@ +From a3aaf76f252bc45f1e3b4da3fbf43e9208aefcb6 Mon Sep 17 00:00:00 2001 +From: KheirFerrum <102964889+KheirFerrum@users.noreply.github.com> +Date: Wed, 8 Nov 2023 00:19:01 +0000 +Subject: [PATCH 066/318] fix: NPCs keep their splints on (#3589) + +* Use is_limb_broken like a normal function. + +* Update npcmove.cpp +--- + src/npcmove.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/npcmove.cpp b/src/npcmove.cpp +index 3a0cd430288..2db92b4c253 100644 +--- a/src/npcmove.cpp ++++ b/src/npcmove.cpp +@@ -4728,8 +4728,8 @@ bool npc::adjust_worn() + } + const auto covers_broken = [this]( const item & it, side s ) { + const body_part_set covered = it.get_covered_body_parts( s ); +- for( const std::pair<const bodypart_str_id, bodypart> &elem : get_body() ) { +- if( elem.second.get_hp_cur() <= 0 && covered.test( elem.first ) ) { ++ for( const bodypart_str_id &bp_id : covered ) { ++ if( is_limb_broken( bp_id ) && covered.test( bp_id ) ) { + return true; + } + } +-- +2.42.0 + |