summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stairs.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/stairs.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/stairs.cc')
-rw-r--r--crawl-ref/source/stairs.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/stairs.cc b/crawl-ref/source/stairs.cc
index d6110a8e63..46d3050a08 100644
--- a/crawl-ref/source/stairs.cc
+++ b/crawl-ref/source/stairs.cc
@@ -705,6 +705,8 @@ void down_stairs(dungeon_feature_type force_stair)
+ short_place_name(shaft_dest) + ".");
}
+ handle_items_on_shaft(you.pos(), false);
+
if (!you.flight_mode() || force_stair)
mpr("You fall through a shaft!");
if (you.flight_mode() && !force_stair)
@@ -928,9 +930,7 @@ void down_stairs(dungeon_feature_type force_stair)
break;
default:
- if (shaft)
- handle_items_on_shaft(you.pos(), false);
- else
+ if (!shaft)
_climb_message(stair_find, false, old_level.branch);
break;
}