summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-09-23 14:43:49 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-09-23 14:43:49 +0000
commitf8dadea90481b48d911cc616f3f7e4c8f91d984d (patch)
treedff6a19d91aeb3776addb852b80b2c7ec106571c
parent3c0f15a6ff536d6e97f856fcc85fbfd36bfb76b3 (diff)
downloadcrawl-ref-f8dadea90481b48d911cc616f3f7e4c8f91d984d.tar.gz
crawl-ref-f8dadea90481b48d911cc616f3f7e4c8f91d984d.zip
Better refix of the drop-on-destroying-grid bug.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@94 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/items.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index ca69eceebb..d8d7a250e4 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -1821,7 +1821,7 @@ bool drop_item( int item_dropped, int quant_drop ) {
const unsigned char my_grid = grd[you.x_pos][you.y_pos];
- if ( my_grid != DNGN_DEEP_WATER && my_grid != DNGN_LAVA &&
+ if ( !grid_destroys_items(my_grid) &&
!copy_item_to_grid( you.inv[item_dropped],
you.x_pos, you.y_pos, quant_drop, true )) {
mpr( "Too many items on this level, not dropping the item." );
@@ -1833,10 +1833,9 @@ bool drop_item( int item_dropped, int quant_drop ) {
snprintf( info, INFO_SIZE, "You drop %s.", str_pass );
mpr(info);
- if ( my_grid == DNGN_DEEP_WATER )
- mpr("It sinks quickly.");
- else if ( my_grid == DNGN_DEEP_WATER )
- mpr("It burns up!");
+ if ( grid_destroys_items(my_grid) ) {
+ mprf(MSGCH_SOUND, grid_item_destruction_message(my_grid));
+ }
dec_inv_item_quantity( item_dropped, quant_drop );
you.turn_is_over = 1;