summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-clouds.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-10-18 06:34:48 +0200
committerAdam Borowski <kilobyte@angband.pl>2013-10-18 06:34:48 +0200
commit548a4c655c81c6fc04d8217ab7d451ef65d1fe0b (patch)
tree03d26b21ef3790aecd14b64cb34b9b84955f33e2 /crawl-ref/source/spl-clouds.cc
parentb04d185340a433973859bc19db894f81e0c20b44 (diff)
downloadcrawl-ref-548a4c655c81c6fc04d8217ab7d451ef65d1fe0b.tar.gz
crawl-ref-548a4c655c81c6fc04d8217ab7d451ef65d1fe0b.zip
Don't place a cloud covering the malign gateway itself, just next to it.
Diffstat (limited to 'crawl-ref/source/spl-clouds.cc')
-rw-r--r--crawl-ref/source/spl-clouds.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/spl-clouds.cc b/crawl-ref/source/spl-clouds.cc
index 59a6f145f6..171d0142f9 100644
--- a/crawl-ref/source/spl-clouds.cc
+++ b/crawl-ref/source/spl-clouds.cc
@@ -225,6 +225,9 @@ static int _make_a_normal_cloud(coord_def where, int pow, int spread_rate,
cloud_type ctype, const actor *agent, int colour,
string name, string tile, int excl_rad)
{
+ if (cell_is_solid(where))
+ return 0;
+
place_cloud(ctype, where,
(3 + random2(pow / 4) + random2(pow / 4) + random2(pow / 4)),
agent, spread_rate, colour, name, tile, excl_rad);
@@ -236,6 +239,7 @@ void big_cloud(cloud_type cl_type, const actor *agent,
const coord_def& where, int pow, int size, int spread_rate,
int colour, string name, string tile)
{
+ // The starting point _may_ be a place no cloud can be placed on.
apply_area_cloud(_make_a_normal_cloud, where, pow, size,
cl_type, agent, spread_rate, colour, name, tile,
-1);