diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-12 13:13:40 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-12 13:13:40 +0000 |
commit | ed3c8c2ae59a947f065499f63daa03fec3a6840d (patch) | |
tree | fa2d6529968da6fa33359f3961697b6e405c65b3 /crawl-ref/source/player.cc | |
parent | 2368157486f9e3c0806d3d79e939fbc3533eb105 (diff) | |
download | crawl-ref-ed3c8c2ae59a947f065499f63daa03fec3a6840d.tar.gz crawl-ref-ed3c8c2ae59a947f065499f63daa03fec3a6840d.zip |
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
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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 |