diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-17 17:38:36 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-17 17:38:36 +0000 |
commit | 23c5277317de657f8376d1b5f33144948a811a42 (patch) | |
tree | de39ce9e4c369e1f42ddf291695d25b1c5c44c55 /crawl-ref/source/player.cc | |
parent | a9a5ce7479fc6358f96aadad9654d35f2a573782 (diff) | |
download | crawl-ref-23c5277317de657f8376d1b5f33144948a811a42.tar.gz crawl-ref-23c5277317de657f8376d1b5f33144948a811a42.zip |
[1738010] Stash-tracker now also tracks traps and other dungeon features.
Changed env.grid to dungeon_feature_type. (The special-level builder still
stores map characters directly into env.grid and then translates them to
features.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1592 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index e266d6d620..a41cd41521 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -151,9 +151,9 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, int id; // assuming that entering the same square means coming from above (levitate) const bool from_above = (you.x_pos == x && you.y_pos == y); - const int old_grid = (from_above) ? static_cast<int>(DNGN_FLOOR) + const dungeon_feature_type old_grid = (from_above) ? DNGN_FLOOR : grd[you.x_pos][you.y_pos]; - const int new_grid = grd[x][y]; + const dungeon_feature_type new_grid = grd[x][y]; // really must be clear ASSERT( !grid_is_solid( new_grid ) ); @@ -296,8 +296,8 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, { trap_known = false; - const int type = trap_category( env.trap[id].type ); - + const dungeon_feature_type type = + trap_category( env.trap[id].type ); grd[you.x_pos][you.y_pos] = type; set_envmap_obj(you.x_pos, you.y_pos, type); } |