summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/view.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-12-02 11:16:44 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-12-02 11:17:19 +0100
commit42ffc507b45717e34d5513929390f40a6972c5b7 (patch)
tree91f2711c112b07d122febeb21af8935e71a13e29 /crawl-ref/source/view.cc
parentf13b738524dd3f3663d1ebeebaa177b80113de69 (diff)
downloadcrawl-ref-42ffc507b45717e34d5513929390f40a6972c5b7.tar.gz
crawl-ref-42ffc507b45717e34d5513929390f40a6972c5b7.zip
Defer exclusion updates for cloud autoexcludes.
This fixes associated slowness.
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r--crawl-ref/source/view.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 5d57574d1f..edade212b9 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -681,8 +681,9 @@ static bool player_view_update_at(const coord_def &gc)
{
for (adjacent_iterator ai(gc, false); ai; ++ai)
{
+ // Optionally add exclude, deferring updates.
if (!cell_is_solid(*ai) && !is_exclude_root(*ai))
- set_exclude(*ai, 0);
+ set_exclude(*ai, 0, false, false, true);
}
}
}
@@ -724,7 +725,10 @@ static void player_view_update()
for (radius_iterator ri(&you.get_los()); ri; ++ri)
if (player_view_update_at(*ri))
update_excludes.push_back(*ri);
+ // Update exclusion LOS for possibly affected excludes.
update_exclusion_los(update_excludes);
+ // Catch up on deferred updates for cloud excludes.
+ deferred_exclude_update();
}
#ifdef USE_TILE