diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-25 08:42:38 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-25 08:42:38 +0000 |
commit | c5ab08484a85c0f7f25bd8199d0e1c688e08eba3 (patch) | |
tree | 9d6b6f646cfaf83418aad472c2787709a9ec19e1 /crawl-ref/source/player.cc | |
parent | a24ec8490ffcc7348f567b96577c4cf841d1411f (diff) | |
download | crawl-ref-c5ab08484a85c0f7f25bd8199d0e1c688e08eba3.tar.gz crawl-ref-c5ab08484a85c0f7f25bd8199d0e1c688e08eba3.zip |
[1861488] Fixed passwall bugs.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3330 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 31d1755bd6..5b598a1c24 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -116,7 +116,7 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, const dungeon_feature_type new_grid = grd[x][y]; // really must be clear - ASSERT( you.can_pass_through( new_grid ) ); + ASSERT( you.can_pass_through_feat( new_grid ) ); // if (grid_is_solid( new_grid )) // return (false); @@ -5175,6 +5175,16 @@ bool actor::airborne() const return (is_levitating() || (flight_mode() == FL_FLY && !paralysed())); } +bool actor::can_pass_through(int x, int y) const +{ + return can_pass_through_feat(grd[x][y]); +} + +bool actor::can_pass_through(const coord_def &c) const +{ + return can_pass_through_feat(grd(c)); +} + ////////////////////////////////////////////////////////////////////////////// // player @@ -5455,21 +5465,11 @@ bool player::floundering() const return in_water() && !can_swim(); } -bool player::can_pass_through(const dungeon_feature_type grid) const +bool player::can_pass_through_feat(dungeon_feature_type grid) const { return !grid_is_solid(grid); } -bool player::can_pass_through(const int _x, const int _y) const -{ - return can_pass_through(grd[_x][_y]); -} - -bool player::can_pass_through(const coord_def &c) const -{ - return can_pass_through(grd(c)); -} - size_type player::body_size(int psize, bool base) const { size_type ret = (base) ? SIZE_CHARACTER : transform_size( psize ); |