summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells1.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r--crawl-ref/source/spells1.cc22
1 files changed, 5 insertions, 17 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index d297fbf181..6483f7d01a 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -152,15 +152,9 @@ int blink(int pow, bool high_level_controlled_blink, bool wizard_blink)
}
else
{
- if (you.attribute[ATTR_HELD])
- {
- int net = get_trapping_net(you.x_pos, you.y_pos);
- if (net != NON_ITEM)
- remove_item_stationary(mitm[net]);
-
- you.attribute[ATTR_HELD] = 0;
- }
-
+ // no longer held in net
+ clear_trapping_net();
+
move_player_to_grid(beam.tx, beam.ty, false, true, true);
// controlling teleport contaminates the player -- bwr
@@ -216,14 +210,8 @@ void random_blink(bool allow_partial_control, bool override_abyss)
{
mpr("You blink.");
- if (you.attribute[ATTR_HELD])
- {
- int net = get_trapping_net(you.x_pos, you.y_pos);
- if (net != NON_ITEM)
- remove_item_stationary(mitm[net]);
-
- you.attribute[ATTR_HELD] = 0;
- }
+ // no longer held in net
+ clear_trapping_net();
succ = true;
you.moveto(tx, ty);