summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2024-08-03 23:04:51 -0700
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2024-08-03 23:04:51 -0700
commit1b6f7d799ef99ca5861cb3d66e3a4e5628e18bcc (patch)
tree47c4d538abf5adde841d0d49d59aa0bdf42badd0
parentAdd patch fixing NPCs failing to wield weapons from worn holsters. (diff)
downloadcataclysm-bn-1b6f7d799ef99ca5861cb3d66e3a4e5628e18bcc.tar.xz
Add patch to fix monsters not travelling down ramps.
-rw-r--r--PKGBUILD7
-rw-r--r--src-17_monsters-can-go-down-ramps.patch12
2 files changed, 18 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 44e0010..3841a8e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,7 +18,7 @@ _pkgname=Cataclysm-BN
pkgver=0.6.0
#pkgver=202310040030
#_pkgver=2023-10-04-0030
-pkgrel=7
+pkgrel=8
pkgdesc="A post-apocalyptic roguelike."
#url="http://cataclysmrl.blogspot.com/"
#url="http://www.cataclysm.glyphgryph.com/"
@@ -163,6 +163,7 @@ source=("$pkgname-$pkgver.tar.gz::https://github.com/cataclysmbnteam/Cataclysm-B
"src-14_fix-npc_melee-calculations.patch"
"src-15_slow-down-fungal-blossoms.patch"
"src-16_npcs-not-wielding-from-worn-holsters.patch"
+ "src-17_monsters-can-go-down-ramps.patch"
"src-20_fix-default-mods.patch"
"vampirism.patch"
@@ -276,6 +277,7 @@ b2sums=('1a311f72d159194d8737b75a484d015caf75a1920b1e9eaa0bdbcd9c0bb8aceda1f59a5
'f10ba62a41e6c0f627b501b907c879ae66e480e90e2ca324d09ba084a6fc0f25e33b384847558f00feb992efcba44eb355ed202351597c5a10a3480bd659f88d'
'c22a81615cd95c01c8722f4be7866f58f488890e518cd74e80f14d65fa3e9889b20666c729cfb317bb55e498d70e13c86b7ba3a61299f667820d4277b2c69c4e'
'b71e033258390937f0c82820ef960c0d3006fdc46182c9d0576c1d9314ff2f672168e259a33eee61b5d0be33eb8ebaf95f59ed76b971a80bc5cb68143b6b7368'
+ '5724d2bf6a163c7d4f4d1f3496550ce522c1cf980e0504fed67cd09d821a00115da94659ded9a3acdb0f0263c799733004c44d778cba8fdeafc6792c8a64ba97'
'5c605faf9fd815e39427722bf6f953cebbe77945e82b7415b7fecfba51978788298fac179ab0b26d28fc948679356f34dc2c475361c82d0149f9a9be04192ff1'
'978657c7b665b57acc5bffcafff55d289775c47bb7c45b924e89c09571bafbe85c5a122c40d9a76add3719c09ad237525493ae08d5501c174fc96720339e59d3')
@@ -776,6 +778,9 @@ prepare() {
# The visit_items() function excluded worn items that are not weapons from the dps check. This meant worn holsters were being ignored.
patch -Np1 --no-backup-if-mismatch -i "$srcdir"/src-16_npcs-not-wielding-from-worn-holsters.patch
+ # Fix monsters not travelling down ramps:
+ # monster::can_reach_to lacked a clause for TFLAG_GOES_DOWN.
+ patch -Np1 --no-backup-if-mismatch -i "$srcdir"/src-17_monsters-can-go-down-ramps.patch
# # # Additional changes
echo "Applying vampirism patch"
diff --git a/src-17_monsters-can-go-down-ramps.patch b/src-17_monsters-can-go-down-ramps.patch
new file mode 100644
index 0000000..a8c3588
--- /dev/null
+++ b/src-17_monsters-can-go-down-ramps.patch
@@ -0,0 +1,12 @@
+--- a/src/monmove.cpp
++++ b/src/monmove.cpp
+@@ -244,6 +244,9 @@
+ return false;
+ }
+ } else if( p.z < pos().z && z_is_valid( pos().z ) ) {
++ if( here.has_flag( TFLAG_RAMP_DOWN, tripoint( p.xy(), p.z + 1 ) ) ) {
++ return true;
++ }
+ if( !here.has_flag( TFLAG_GOES_DOWN, pos() ) ) {
+ // can't go through the floor
+ // you would fall anyway if there was no floor, so no need to check for that here