summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemname.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-10-25 14:43:26 +0100
committerAdam Borowski <kilobyte@angband.pl>2009-10-25 14:43:26 +0100
commit6dca0fa1e8f2b2d6509e30e9b73c5104e8792709 (patch)
tree72f77645041b39daba71853e2ec05ee6cbbd29c3 /crawl-ref/source/itemname.cc
parent98b7f12e57c76638fd88f2d56bd54607267b392f (diff)
downloadcrawl-ref-6dca0fa1e8f2b2d6509e30e9b73c5104e8792709.tar.gz
crawl-ref-6dca0fa1e8f2b2d6509e30e9b73c5104e8792709.zip
Make all but one weapon size checks use you.could_wield(), they were out of sync,
that caused autoexplore ignore butchering knives for nagas, many weapons being randomly shown as useless while perfectly wieldable, and so on.
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r--crawl-ref/source/itemname.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 17a499f1e0..72fdb59a01 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -2502,7 +2502,7 @@ bool is_useless_item(const item_def &item, bool temp)
switch (item.base_type)
{
case OBJ_WEAPONS:
- if (!check_weapon_wieldable_size(item, you.body_size(PSIZE_BODY, !temp))
+ if (!you.could_wield(item, true)
&& !is_throwable(&you, item))
{
// Weapon is too large (or small) to be wielded and cannot be