summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-13 15:20:35 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-13 15:22:17 +0100
commit11670ba75fa20fc3b5860eb2474aba6157c6e114 (patch)
treef87e5b811b99716a18b86469f297365987f35f71 /crawl-ref/source
parentd21b754210905c4bf50e0c346d820b3d8b1af01c (diff)
downloadcrawl-ref-11670ba75fa20fc3b5860eb2474aba6157c6e114.tar.gz
crawl-ref-11670ba75fa20fc3b5860eb2474aba6157c6e114.zip
Replace calc_show_los by you.update_los.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/actor-los.cc7
-rw-r--r--crawl-ref/source/files.cc2
-rw-r--r--crawl-ref/source/l_you.cc2
-rw-r--r--crawl-ref/source/los.cc6
-rw-r--r--crawl-ref/source/los.h2
-rw-r--r--crawl-ref/source/mon-act.cc2
-rw-r--r--crawl-ref/source/view.cc2
7 files changed, 9 insertions, 14 deletions
diff --git a/crawl-ref/source/actor-los.cc b/crawl-ref/source/actor-los.cc
index 25361a7177..f9618cd8c9 100644
--- a/crawl-ref/source/actor-los.cc
+++ b/crawl-ref/source/actor-los.cc
@@ -55,8 +55,11 @@ const los_def& monsters::get_los_no_trans()
void player::update_los()
{
- los_no_trans.update();
- actor::update_los();
+ if (!crawl_state.arena || !crawl_state.arena_suspended)
+ {
+ los_no_trans.update();
+ actor::update_los();
+ }
}
// Player LOS overrides for arena.
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index 9bfb072dc3..6d9f0d0338 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -1889,7 +1889,7 @@ static void _restore_level(const level_id &original)
you.level_type, you.your_level, you.where_are_you );
// Rebuild the show grid, which was cleared out before.
- calc_show_los();
+ you.update_los();
}
// Given a level returns true if the level has been created already
diff --git a/crawl-ref/source/l_you.cc b/crawl-ref/source/l_you.cc
index 5375af2c95..7288d85408 100644
--- a/crawl-ref/source/l_you.cc
+++ b/crawl-ref/source/l_you.cc
@@ -248,7 +248,7 @@ LUAFN(you_random_teleport)
LUAFN(you_losight)
{
- calc_show_los();
+ you.update_los();
return (0);
}
diff --git a/crawl-ref/source/los.cc b/crawl-ref/source/los.cc
index 9a3354eac0..d6a8eabcd5 100644
--- a/crawl-ref/source/los.cc
+++ b/crawl-ref/source/los.cc
@@ -898,9 +898,3 @@ void losight(los_grid& sh, const coord_def& center,
{
losight(sh, los_param_funcs(center, opc, bounds));
}
-
-void calc_show_los()
-{
- if (!crawl_state.arena && !crawl_state.arena_suspended)
- you.update_los();
-}
diff --git a/crawl-ref/source/los.h b/crawl-ref/source/los.h
index c39a9f4143..ca8abc706f 100644
--- a/crawl-ref/source/los.h
+++ b/crawl-ref/source/los.h
@@ -47,6 +47,4 @@ void losight(los_grid& sh, const coord_def& center,
const circle_def &bds = BDS_DEFAULT);
void losight(los_grid& sh, const los_param& param);
-void calc_show_los();
-
#endif
diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc
index 8b1a108830..4a7b798619 100644
--- a/crawl-ref/source/mon-act.cc
+++ b/crawl-ref/source/mon-act.cc
@@ -1581,7 +1581,7 @@ static void _khufu_drop_tomb(monsters *monster)
}
if (count)
{
- calc_show_los();
+ you.update_los();
if (monster->observable())
mpr("The walls disappear!");
else
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index d9bff577fe..c448dc2b9c 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -886,7 +886,7 @@ void viewwindow(bool do_updates)
screen_buffer_t *buffy(crawl_view.vbuf);
- calc_show_los();
+ you.update_los();
#ifdef USE_TILE
tiles.clear_text_tags(TAG_NAMED_MONSTER);