diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-09 13:59:30 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-09 13:59:30 +0000 |
commit | 1c7e145a0a082b50c22ce53b6db7fccfc6ad9e31 (patch) | |
tree | 8ab3a0be1e727a6584d4727c0df5ff5a10c17918 /crawl-ref/source/food.cc | |
parent | cd08ab62d681ee480339a2f26d833bf9d4104dda (diff) | |
download | crawl-ref-1c7e145a0a082b50c22ce53b6db7fccfc6ad9e31.tar.gz crawl-ref-1c7e145a0a082b50c22ce53b6db7fccfc6ad9e31.zip |
Rewrite of beam.cc: put all beam data in one place. Might be buggy.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7201 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/food.cc')
-rw-r--r-- | crawl-ref/source/food.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index 8a73d1aa84..e42bb09e33 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -364,8 +364,7 @@ static void _terminate_butchery(bool wpn_switch, bool removed_gloves, { // Switch weapon back. if (wpn_switch && you.equip[EQ_WEAPON] != old_weapon - && (you.equip[EQ_WEAPON] == -1 - || !item_cursed(you.inv[you.equip[EQ_WEAPON]]))) + && (!you.weapon() || !item_cursed(*you.weapon()))) { start_delay( DELAY_WEAPON_SWAP, 1, old_weapon ); } @@ -475,8 +474,7 @@ bool butchery(int which_corpse) && !item_cursed(you.inv[you.equip[EQ_GLOVES]])); bool can_butcher = teeth_butcher || barehand_butcher - || you.equip[EQ_WEAPON] != -1 - && can_cut_meat(you.inv[you.equip[EQ_WEAPON]]); + || (you.weapon() && can_cut_meat(*you.weapon())); if (!Options.easy_butcher && !can_butcher) { |