summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells1.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-26 11:32:57 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-26 11:32:57 +0000
commitce6a7efb9404d67af78ecd3a42d2e4f430b8cbab (patch)
tree9faeef5b828dc92839f8320a2e4b8e3af8c810e9 /crawl-ref/source/spells1.cc
parentf2341f8e9711e2154a826e85e28280d02337dc36 (diff)
downloadcrawl-ref-ce6a7efb9404d67af78ecd3a42d2e4f430b8cbab.tar.gz
crawl-ref-ce6a7efb9404d67af78ecd3a42d2e4f430b8cbab.zip
Fix bug 1814617: teleport/banish not clearing being trapped in net
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2588 c06c8d41-db1a-0410-9941-cceddc491573
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);