diff options
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/libgui.cc | 23 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 4 |
2 files changed, 15 insertions, 12 deletions
diff --git a/crawl-ref/source/libgui.cc b/crawl-ref/source/libgui.cc index 024b1bf52b..4de458b23a 100644 --- a/crawl-ref/source/libgui.cc +++ b/crawl-ref/source/libgui.cc @@ -356,16 +356,6 @@ void GmapUpdate(int x, int y, int what, bool upd_tile) if (x == you.x_pos && y == you.y_pos) c = Options.tile_player_col; // player position always highlighted - else if (mgrd[x][y] != NON_MONSTER && upd_tile) - { - if (mons_friendly(&menv[mgrd[x][y]])) - c = Options.tile_friendly_col; // colour friendly monsters - else if (mons_neutral(&menv[mgrd[x][y]]) - && Options.tile_neutral_col != Options.tile_monster_col) - { - c = Options.tile_neutral_col; // colour neutral monsters - } - } else { const coord_def gc(x,y); @@ -386,7 +376,18 @@ void GmapUpdate(int x, int y, int what, bool upd_tile) c = _gmap_to_colour(gmap_col[what & 0xff]); break; } - + if (c == Options.tile_monster_col && mgrd[x][y] != NON_MONSTER + && upd_tile) + { + if (mons_friendly(&menv[mgrd[x][y]])) + c = Options.tile_friendly_col; // colour friendly monsters + else if (mons_neutral(&menv[mgrd[x][y]]) + && Options.tile_neutral_col != Options.tile_monster_col) + { + c = Options.tile_neutral_col; // colour neutral monsters + } + } + if (c == Options.tile_floor_col && is_excluded( coord_def(x,y) )) c = Options.tile_excluded_col; } diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 65e9afc774..3a4d4b7da4 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -321,8 +321,10 @@ bool move_player_to_grid( int x, int y, bool stepped, bool allow_shift, if (!stepped) trap_known = false; + // mechanical traps and shafts cannot be set off if the + // player is flying or levitating if (!player_is_airborne() - || trap_category( env.trap[id].type ) != DNGN_TRAP_MECHANICAL) + || trap_category( env.trap[id].type ) == DNGN_TRAP_MAGICAL) { handle_traps(env.trap[id].type, id, trap_known); } |