summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/showsymb.cc
diff options
context:
space:
mode:
authorRaphael Langella <raphael.langella@gmail.com>2012-07-05 23:53:53 +0200
committerRaphael Langella <raphael.langella@gmail.com>2012-07-17 01:00:25 +0200
commit410924b6f8f920b2b3f2f0b06a79b14e70e2f874 (patch)
tree26a2eebcba75a835033df5e881e54cf976291da4 /crawl-ref/source/showsymb.cc
parent7e4a16d5bd7991abfef63f37e42ac9ac0973c206 (diff)
downloadcrawl-ref-410924b6f8f920b2b3f2f0b06a79b14e70e2f874.tar.gz
crawl-ref-410924b6f8f920b2b3f2f0b06a79b14e70e2f874.zip
Show the autoexplore limit in Shoals.
The autoexplore is now limited to cells with a height > -18, which is about the sand limit at low tide. We say that beyond this point, the bottom changes from sand to rock and autoexplore won't try to go there, even if they are traverseable. This greatly reduce autoexplore time, and even amphibious species will respect it. It doesn't prevent a merfolk from crossing deep water to explore an island spotted over the water, but they won't randomly explore the sea. To illustrate the limit, shallow water is light cyan or cyan, deep water is light blue or blue.
Diffstat (limited to 'crawl-ref/source/showsymb.cc')
-rw-r--r--crawl-ref/source/showsymb.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/crawl-ref/source/showsymb.cc b/crawl-ref/source/showsymb.cc
index 940cd5bec1..0825fd8d6c 100644
--- a/crawl-ref/source/showsymb.cc
+++ b/crawl-ref/source/showsymb.cc
@@ -10,6 +10,7 @@
#include "showsymb.h"
#include "colour.h"
+#include "dgn-height.h"
#include "env.h"
#include "libutil.h"
#include "map_knowledge.h"
@@ -95,8 +96,14 @@ unsigned short _cell_feat_show_colour(const map_cell& cell,
}
}
- if (feat == DNGN_SHALLOW_WATER && player_in_branch(BRANCH_SHOALS))
- colour = ETC_WAVES;
+ if (player_in_branch(BRANCH_SHOALS))
+ {
+ const int height = dgn_height_at(loc);
+ if (feat == DNGN_SHALLOW_WATER)
+ colour = height > SHT_SHORE ? LIGHTCYAN : CYAN;
+ if (feat == DNGN_DEEP_WATER)
+ colour = height > SHT_SHORE ? LIGHTBLUE : BLUE;
+ }
if (feat_has_solid_floor(feat) && !feat_is_water(feat)
&& cell.flags & MAP_LIQUEFIED)