summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/traps.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2013-11-08 18:36:50 -0500
committerNeil Moore <neil@s-z.org>2013-11-08 18:43:37 -0500
commit28bb301f2f7f6a39608b939c2b72bb8b44414dd0 (patch)
tree6fe588e1ce4e6ea54b2844ced62448c566b6ba9a /crawl-ref/source/traps.cc
parente1ee01b3b0c42ea0986d471950065e24ca16d4e6 (diff)
downloadcrawl-ref-28bb301f2f7f6a39608b939c2b72bb8b44414dd0.tar.gz
crawl-ref-28bb301f2f7f6a39608b939c2b72bb8b44414dd0.zip
Don't shaft stationary nets (#7714)
Diffstat (limited to 'crawl-ref/source/traps.cc')
-rw-r--r--crawl-ref/source/traps.cc24
1 files changed, 10 insertions, 14 deletions
diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc
index 7f7b68adfb..d73b870333 100644
--- a/crawl-ref/source/traps.cc
+++ b/crawl-ref/source/traps.cc
@@ -1771,37 +1771,33 @@ void handle_items_on_shaft(const coord_def& pos, bool open_shaft)
if (o == NON_ITEM)
return;
- igrd(pos) = NON_ITEM;
-
- if (env.map_knowledge(pos).seen() && open_shaft)
- {
- mpr("A shaft opens up in the floor!");
- grd(pos) = DNGN_TRAP_SHAFT;
- }
+ bool need_open_message = env.map_knowledge(pos).seen() && open_shaft;
while (o != NON_ITEM)
{
int next = mitm[o].link;
- if (mitm[o].defined())
+ if (mitm[o].defined() && !item_is_stationary(mitm[o]))
{
- bool update_stash = false;
+ if (need_open_message)
+ {
+ mpr("A shaft opens up in the floor!");
+ grd(pos) = DNGN_TRAP_SHAFT;
+ need_open_message = false;
+ }
+
if (env.map_knowledge(pos).visible())
{
mprf("%s fall%s through the shaft.",
mitm[o].name(DESC_INVENTORY).c_str(),
mitm[o].quantity == 1 ? "s" : "");
- update_stash = true;
- }
-
- if (update_stash)
- {
env.map_knowledge(pos).clear_item();
StashTrack.update_stash(pos);
}
// Item will be randomly placed on the destination level.
+ unlink_item(o);
mitm[o].pos = INVALID_COORD;
add_item_to_transit(dest, mitm[o]);