summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-24 20:20:59 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-24 20:20:59 +0000
commit62158949d1894237d068b363510afa78c6df8e6e (patch)
tree507b8226b3c63931d319d3f99ad8d23a4a1598d6 /crawl-ref/source
parentd61352601c4d533931474d1f1b407d281204df5c (diff)
downloadcrawl-ref-62158949d1894237d068b363510afa78c6df8e6e.tar.gz
crawl-ref-62158949d1894237d068b363510afa78c6df8e6e.zip
Fix the display of monsters in the tiles minimap. (My mistake, sorry.)
And remove the strange exception for shafts in the calling of handle_traps() as brought up in Bug 1916327 (now discussion about levitation + traps). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3863 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/libgui.cc23
-rw-r--r--crawl-ref/source/player.cc4
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);
}