summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-09-28 08:33:27 -0500
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-09-28 08:33:27 -0500
commitba9e8a28d4444f554a142345cbba7110c77dd83f (patch)
tree17ae27c94d5b9be09163f656f2cffb9aa6828240 /crawl-ref
parent83efefc37d8a81fc2fbc97b1ab0580ffe1c168ce (diff)
downloadcrawl-ref-ba9e8a28d4444f554a142345cbba7110c77dd83f.tar.gz
crawl-ref-ba9e8a28d4444f554a142345cbba7110c77dd83f.zip
Apply kotk's patch in [2868294] to make monsters properly pick up
throwable melee weapons for throwing.
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/mon-util.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index a80699eb9b..601704b69a 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -4768,7 +4768,9 @@ static bool _item_race_matches_monster(const item_def &item, monsters *mons)
bool monsters::pickup_melee_weapon(item_def &item, int near)
{
- const bool dual_wielding = mons_wields_two_weapons(this);
+ // Throwable weapons may be picked up as though dual-wielding.
+ const bool dual_wielding = (mons_wields_two_weapons(this)
+ || is_throwable(this, item));
if (dual_wielding)
{
// If we have either weapon slot free, pick up the weapon.