lighting: try to avoid looking through walls...

This commit is contained in:
Laurent Alonso(fr)
2020-06-01 20:04:50 +02:00
committed by Celtic Minstrel
parent 974e614c3b
commit 2650a35d9b

View File

@@ -739,7 +739,7 @@ void draw_terrain(short mode) {
where_draw.x += i - 6;
where_draw.y += j - 6;
if(!(is_out()))
light_area[i][j] = (is_town()) ? pt_in_light(view_loc,where_draw) : combat_pt_in_light(where_draw);
light_area[i][j] = (is_town()) ? (can_see_light(view_loc,where_draw,sight_obscurity)<=4) : combat_pt_in_light(where_draw);
if((where_draw.x < 0) || (where_draw.x > max_dim - 1)
|| (where_draw.y < 0) || (where_draw.y > max_dim - 1))
unexplored_area[i][j] = 0;