summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/view.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-06 11:03:21 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-06 11:03:21 +0000
commit960323c5b08a5431ac60b72c7de65a40ef203183 (patch)
tree6571ec0d182fd5a597968a0415f80a15bbea3680 /crawl-ref/source/view.cc
parent6efc5c639a0ba48559c2fad77376a210b503256c (diff)
downloadcrawl-ref-960323c5b08a5431ac60b72c7de65a40ef203183.tar.gz
crawl-ref-960323c5b08a5431ac60b72c7de65a40ef203183.zip
Fix 1945389: Detect Creatures not clearing monsters detected on changed
terrain. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6419 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r--crawl-ref/source/view.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 2a4176acc1..a8a070e17d 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -668,7 +668,7 @@ screen_buffer_t colour_code_map( int x, int y, bool item_colour,
return real_colour(tc);
}
-int count_detected_plants()
+int count_detected_mons()
{
int count = 0;
for (int y = Y_BOUND_1; y <= Y_BOUND_2; ++y)
@@ -681,11 +681,7 @@ int count_detected_plants()
if (is_terrain_changed(x, y))
continue;
- unsigned envc = get_envmap_char(x, y);
- if (!envc)
- continue;
-
- if (envc == 'P' || envc == 'f')
+ if (is_envmap_detected_mons(x, y))
count++;
}
@@ -701,8 +697,11 @@ void clear_map(bool clear_detected_items, bool clear_detected_monsters)
// Note: assumptions are being made here about how
// terrain can change (eg it used to be solid, and
// thus monster/item free).
- if (is_terrain_changed(x, y))
- continue;
+
+ // This reasoning doesn't make sense when it comes to *clearing*
+ // the map! (jpeg)
+// if (is_terrain_changed(x, y))
+// continue;
unsigned envc = get_envmap_char(x, y);
if (!envc)