diff options
author | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-21 03:58:34 +0000 |
---|---|---|
committer | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-21 03:58:34 +0000 |
commit | 3bc5803595bf91439ca4805cec5f7f2bed0de72a (patch) | |
tree | 020c49afbd7e3e4798242fdc8354d899a0e61e54 /crawl-ref/source/player.cc | |
parent | 20435a6543a7245c0f4bc64f85959064cc98abcf (diff) | |
download | crawl-ref-3bc5803595bf91439ca4805cec5f7f2bed0de72a.tar.gz crawl-ref-3bc5803595bf91439ca4805cec5f7f2bed0de72a.zip |
[2496621] Fixing view recentering on abyss shifts. Shifts now preserve any scrolling that had occured.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8641 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 086782330c..c0dbe2af63 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -7214,13 +7214,12 @@ bool player::is_icy() const return (attribute[ATTR_TRANSFORMATION] == TRAN_ICE_BEAST); } -void player::moveto(const coord_def &c) +void player::base_moveto(const coord_def &c) { ASSERT(!crawl_state.arena); const bool real_move = (c != pos()); position = c; - crawl_view.set_player_at(c); if (real_move) { @@ -7233,6 +7232,18 @@ void player::moveto(const coord_def &c) } } +void player::moveto(const coord_def &c) +{ + crawl_view.set_player_at(c); + base_moveto(c); +} + +void player::shiftto(const coord_def &c) +{ + crawl_view.shift_player_to(c); + base_moveto(c); +} + void player::reset_prev_move() { prev_move = coord_def(0,0); |