diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-09-25 16:54:24 +0200 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-10-06 17:45:16 +0200 |
commit | 9712c77f98bb70849f42e073801ac0319b8b846b (patch) | |
tree | c2b976c6fdfc2ac507b42b5c17f5a9c0c0125dfc /crawl-ref/source/view.cc | |
parent | f409c04e8f5b4525caeb2683fd71c778efdadaf1 (diff) | |
download | crawl-ref-9712c77f98bb70849f42e073801ac0319b8b846b.tar.gz crawl-ref-9712c77f98bb70849f42e073801ac0319b8b846b.zip |
Convert varius occurrences of LOS_RADIUS * LOS_RADIUS.
LOS actually goes to LOS_RADIUS * LOS_RADIUS + 1. None of the
occurrences are likely to have had a big effect, however.
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r-- | crawl-ref/source/view.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index 877de78354..f939f4a6a2 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -4181,7 +4181,7 @@ bool trans_wall_blocking( const coord_def &p ) bool grid_see_grid(const coord_def& p1, const coord_def& p2, dungeon_feature_type allowed) { - if (distance(p1, p2) > LOS_RADIUS * LOS_RADIUS) + if (distance(p1, p2) > los_radius_squared) return (false); dungeon_feature_type max_disallowed = DNGN_MAXOPAQUE; @@ -6053,7 +6053,7 @@ void monster_los::set_los_value(int x, int y, bool blocked, bool override) int monster_los::get_los_value(int x, int y) { // Too far away -> definitely out of sight! - if (distance(x, y, gridx, gridy) > LOS_RADIUS * LOS_RADIUS) + if (distance(x, y, gridx, gridy) > los_radius_squared) return (L_BLOCKED); coord_def c(x,y); |