summaryrefslogtreecommitdiff
path: root/revert-27_fix-NPCs-keep-their-splints-on-3589.patch
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2023-12-30 21:58:12 -0800
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2023-12-30 21:58:12 -0800
commitd4bc63a8f8ee37ec2de2f43734a60ca045e517c3 (patch)
treed49d6000c1d82e7add7cfcccf873f85224ab823c /revert-27_fix-NPCs-keep-their-splints-on-3589.patch
parentFix Mr Lapin meet the Isherwood quest looping. (diff)
downloadcataclysm-bn-d4bc63a8f8ee37ec2de2f43734a60ca045e517c3.tar.xz
Updated to 0.5.1
Removed obsolete mods. Revert removal of Alonso. Revert biodiesel working in petrol engines. Revert hard skill caps. Revert three more broken limb changesets. Revert another ammo rebalance changeset. Revert craftable smokeless gunpowder changeset. Revised book chapters revert patch. Fix some bad terrain in the godco patch. Fix some bad terrain in the prison island patch.
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.patch30
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
+