diff options
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/effects.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/mon-util.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/travel.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/view.cc | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index ee0321e026..51a8b8a3d7 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -4276,7 +4276,7 @@ void collect_radius_points(std::vector<std::vector<coord_def> > &radius_points, int current_r = 1; int current_thresh = current_r * (current_r + 1); - int max_distance = LOS_RADIUS * LOS_RADIUS; + int max_distance = LOS_RADIUS * LOS_RADIUS + 1; while (!fringe.empty()) { diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index bdd26457cb..e3eedd2795 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -7932,7 +7932,7 @@ bool monsters::visible_to(const actor *looker) const bool monsters::mon_see_grid(const coord_def& p, bool reach) const { - if (distance(pos(), p) > LOS_RADIUS * LOS_RADIUS) + if (distance(pos(), p) > LOS_RADIUS * LOS_RADIUS + 1) return (false); dungeon_feature_type max_disallowed = DNGN_MAXOPAQUE; diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc index 19128fcd35..8531fd2ca1 100644 --- a/crawl-ref/source/travel.cc +++ b/crawl-ref/source/travel.cc @@ -325,7 +325,7 @@ void update_exclusion_los(const coord_def &p) { for (unsigned int i = 0; i < curr_excludes.size(); i++) if (!curr_excludes[i].uptodate - && (curr_excludes[i].pos - p).abs() <= LOS_RADIUS * LOS_RADIUS) + && (curr_excludes[i].pos - p).abs() <= LOS_RADIUS * LOS_RADIUS + 1) { curr_excludes[i].set_exclude_show(); } 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); |