summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/los_def.h
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2010-01-26 22:53:47 +0100
committerRobert Vollmert <rvollmert@gmx.net>2010-01-26 23:05:33 +0100
commit98003eee41c183876eb5971700aa29f7a7b128bd (patch)
tree4167b3d8a13355324864c837619fe1a23fc4ed40 /crawl-ref/source/los_def.h
parent3b4e8ee7e2e1408b86834e0f8b109a1fcee402f0 (diff)
downloadcrawl-ref-98003eee41c183876eb5971700aa29f7a7b128bd.tar.gz
crawl-ref-98003eee41c183876eb5971700aa29f7a7b128bd.zip
Hack monster LOS to reduce updates.
It's now only updated if the monster has moved or is in view of the player. That means it will not necessarily be accurate if terrain or clouds are LOS-affecting monsters change/move. I'm not sure that this is much better than just not updating LOS for sleeping monsters -- depends on to what extent monsters just stay in place. Previously, crawl spent a significant amount of time with the monster LOS updates. Other options: - Calculate monster LOS on-demand (unlikely to help much) - Reduce monster LOS range away from the player (this might require some changes to LOS code to actually save time) - Track LOS globally: for each cell, which other cells are visible? An estimated 200 kB of data. This would then only be updated if terrain/clouds/LOS-affecting monsters changed.
Diffstat (limited to 'crawl-ref/source/los_def.h')
-rw-r--r--crawl-ref/source/los_def.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/los_def.h b/crawl-ref/source/los_def.h
index ded8c1c792..bc2cf4d8ff 100644
--- a/crawl-ref/source/los_def.h
+++ b/crawl-ref/source/los_def.h
@@ -24,6 +24,7 @@ public:
const circle_def& b);
void init_arena(const coord_def& center);
void set_center(const coord_def& center);
+ coord_def get_center();
void set_opacity(const opacity_func& o);
void set_bounds(const circle_def& b);
circle_def get_bounds() const;