diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-12-30 02:02:37 -0800 |
---|---|---|
committer | Stefan O'Rear <stefanor@cox.net> | 2009-12-30 02:02:37 -0800 |
commit | 2bbd33ecce444f4a14e817355c67d5d86d505c16 (patch) | |
tree | a5476436c6651afb836bdebf607a0a280a11404b | |
parent | 5b697e0c33dbab41e41c63df1ef2b366fbf0a8d9 (diff) | |
download | crawl-ref-2bbd33ecce444f4a14e817355c67d5d86d505c16.tar.gz crawl-ref-2bbd33ecce444f4a14e817355c67d5d86d505c16.zip |
Killing a merfolk should not cause it to leap 10 feet into the air and drop its gear from a height.
-rw-r--r-- | crawl-ref/source/items.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/mon-stuff.cc | 5 | ||||
-rw-r--r-- | crawl-ref/source/monster.cc | 2 |
3 files changed, 12 insertions, 4 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 9a060c2933..1aaeda2dec 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -1995,7 +1995,14 @@ bool drop_item( int item_dropped, int quant_drop, bool try_offer ) mprf("You drop %s.", quant_name(you.inv[item_dropped], quant_drop, DESC_NOCAP_A).c_str()); - if (feat_destroys_item(my_grid, you.inv[item_dropped], !silenced(you.pos()))) + bool quiet = silenced(you.pos()); + + // If you drop an item in as a merfolk, it is below the water line and + // makes no noise falling. + if (you.swimming()) + quiet = true; + + if (feat_destroys_item(my_grid, you.inv[item_dropped], !quiet)) ; else if (strstr(you.inv[item_dropped].inscription.c_str(), "=s") != 0) StashTrack.add_stash(); diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc index bcaeecc95a..cb14b67710 100644 --- a/crawl-ref/source/mon-stuff.cc +++ b/crawl-ref/source/mon-stuff.cc @@ -277,7 +277,8 @@ void monster_drop_ething(monsters *monster, bool mark_item_origins, if (mark_item_origins && mitm[item].is_valid()) origin_set_monster(mitm[item], monster); - move_item_to_grid(&item, monster->pos()); + // If a monster is swimming, the items are ALREADY underwater + move_item_to_grid(&item, monster->pos(), monster->swimming()); } monster->inv[i] = NON_ITEM; @@ -466,7 +467,7 @@ int place_monster_corpse(const monsters *monster, bool silent, return (-1); } - move_item_to_grid(&o, monster->pos()); + move_item_to_grid(&o, monster->pos(), !monster->swimming()); if (you.see_cell(monster->pos())) { diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index de3af6b0a9..8d0f02f428 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -1174,7 +1174,7 @@ bool monsters::drop_item(int eslot, int near) pitem->name(DESC_NOCAP_A).c_str()); } - if (!move_item_to_grid(&item_index, pos())) + if (!move_item_to_grid(&item_index, pos(), swimming())) { // Re-equip item if we somehow failed to drop it. if (was_unequipped) |