summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapdef.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-07-02 17:02:51 -0400
committerNeil Moore <neil@s-z.org>2014-07-02 17:05:06 -0400
commite872541d54f7ef1686daddd3beb1479ad5cb423e (patch)
treea81f15f78f62db29136ea6bf8842f8be9d9cab07 /crawl-ref/source/mapdef.cc
parented3dc989f9b3c80e3cca87b4f1296106cebe2af0 (diff)
downloadcrawl-ref-e872541d54f7ef1686daddd3beb1479ad5cb423e.tar.gz
crawl-ref-e872541d54f7ef1686daddd3beb1479ad5cb423e.zip
Don't overwrite primary vault tiles with layout tiles (#8108, #6150)
The remaining problem behind this longstanding bug was that the layout overwrote the colour, height, tiles, etc. of all squares---even ones that were already placed by the primary vault.
Diffstat (limited to 'crawl-ref/source/mapdef.cc')
-rw-r--r--crawl-ref/source/mapdef.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index 1fe5a41463..24982bf68e 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -579,7 +579,7 @@ void map_lines::apply_markers(const coord_def &c)
markers.clear();
}
-void map_lines::apply_grid_overlay(const coord_def &c)
+void map_lines::apply_grid_overlay(const coord_def &c, bool is_layout)
{
if (!overlay.get())
return;
@@ -588,6 +588,8 @@ void map_lines::apply_grid_overlay(const coord_def &c)
for (int x = width() - 1; x >= 0; --x)
{
coord_def gc(c.x + x, c.y + y);
+ if (is_layout && map_masked(gc, MMT_VAULT))
+ continue;
const int colour = (*overlay)(x, y).colour;
if (colour)
@@ -671,10 +673,10 @@ void map_lines::apply_grid_overlay(const coord_def &c)
}
}
-void map_lines::apply_overlays(const coord_def &c)
+void map_lines::apply_overlays(const coord_def &c, bool is_layout)
{
apply_markers(c);
- apply_grid_overlay(c);
+ apply_grid_overlay(c, is_layout);
}
const vector<string> &map_lines::get_lines() const