summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-transit.cc
diff options
context:
space:
mode:
authorpubby <pubby8@gmail.com>2013-09-08 23:43:37 -0500
committerAdam Borowski <kilobyte@angband.pl>2013-09-09 19:56:37 +0200
commitb40361279b1c355d4aead5b7c3c80d87925eb835 (patch)
tree17b9698aa276b8bec6f2ae52a034e45fd0689406 /crawl-ref/source/mon-transit.cc
parent9b01effd8b0b49ee8f82d9157e033bdcaeaba2a5 (diff)
downloadcrawl-ref-b40361279b1c355d4aead5b7c3c80d87925eb835.tar.gz
crawl-ref-b40361279b1c355d4aead5b7c3c80d87925eb835.zip
Fix shafting with items bugs.
First, the down_stairs function called handle_items_on_shaft, but it called it after changing you.depth. This meant it shafted the items you LANDED on, rather than the items you were standing on at the time of shafting. Second, the stash and map knowledge weren't being cleared despite the items being obviously moved. Third, place_transiting_items wasn't handling stacks properly. If you shafted a stack of ammo, only 1 ammo would exist afterwards. This also fixes also applies to any other usage of place_transiting_items.
Diffstat (limited to 'crawl-ref/source/mon-transit.cc')
-rw-r--r--crawl-ref/source/mon-transit.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-transit.cc b/crawl-ref/source/mon-transit.cc
index d80e74c2e9..6382d395db 100644
--- a/crawl-ref/source/mon-transit.cc
+++ b/crawl-ref/source/mon-transit.cc
@@ -237,7 +237,7 @@ void place_transiting_items()
pos, true);
// List of items we couldn't place.
- if (!copy_item_to_grid(*item, where_to_go, 1, false, true))
+ if (!copy_item_to_grid(*item, where_to_go, -1, false, true))
keep.push_back(*item);
}