summaryrefslogtreecommitdiff
path: root/src-14_fix-npc_melee-calculations.patch
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2024-01-07 14:57:34 -0800
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2024-01-07 14:57:34 -0800
commit2a7178e4a6f77730d82545a98c2572a2a782308a (patch)
tree2157ead0230061581819944963330a4f52ee8ad2 /src-14_fix-npc_melee-calculations.patch
parentUpdated to 0.5.2 (diff)
downloadcataclysm-bn-2a7178e4a6f77730d82545a98c2572a2a782308a.tar.xz
Add patch to fix npcs taking no action while in melee range.
Fix version string.
Diffstat (limited to 'src-14_fix-npc_melee-calculations.patch')
-rw-r--r--src-14_fix-npc_melee-calculations.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/src-14_fix-npc_melee-calculations.patch b/src-14_fix-npc_melee-calculations.patch
new file mode 100644
index 0000000..ea98989
--- /dev/null
+++ b/src-14_fix-npc_melee-calculations.patch
@@ -0,0 +1,11 @@
+--- a/src/npcmove.cpp
++++ b/src/npcmove.cpp
+@@ -1409,7 +1409,7 @@
+ return npc_reload;
+ }
+
+- if( dist == 1 && same_z ) {
++ if( dist <= 1 && same_z ) {
+ add_msg( m_debug, "%s is trying a melee attack", disp_name() );
+ return npc_melee;
+ }