From ed3c8c2ae59a947f065499f63daa03fec3a6840d Mon Sep 17 00:00:00 2001 From: haranp Date: Thu, 12 Feb 2009 13:13:40 +0000 Subject: Clearing trapping nets moved into player::moveto() and level change. This fixes some bugs (e.g. Portal spell and nets interact properly.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9036 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/player.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 76bd7e5b0d..ee77d16af3 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -7248,6 +7248,9 @@ void player::base_moveto(const coord_def &c) void player::moveto(const coord_def &c) { + if (c != you.pos()) + clear_trapping_net(); + crawl_view.set_player_at(c); base_moveto(c); } @@ -7260,7 +7263,7 @@ void player::shiftto(const coord_def &c) void player::reset_prev_move() { - prev_move = coord_def(0,0); + prev_move.reset(); } bool player::asleep() const -- cgit v1.2.3-54-g00ecf