Fix edge of town rendering bug (#486)

Fix #485
This commit is contained in:
2024-11-23 13:09:05 -06:00
committed by GitHub
parent 21afd4466d
commit c1142379c9

View File

@@ -751,8 +751,11 @@ void draw_terrain(short mode) {
where_draw = (is_out()) ? univ.party.out_loc : center; where_draw = (is_out()) ? univ.party.out_loc : center;
where_draw.x += q - 4; where_draw.x += q - 4;
where_draw.y += r - 4; where_draw.y += r - 4;
if (where_draw.x < 0 || where_draw.y < 0 || where_draw.x >= max_dim_x || where_draw.y >= max_dim_y) if (where_draw.x < 0 || where_draw.y < 0 || where_draw.x >= max_dim_x || where_draw.y >= max_dim_y){
// Out of bounds. Draw darkness
draw_one_terrain_spot(q,r,-1);
continue; continue;
}
draw_frills = true; draw_frills = true;
if(!is_out() && !univ.town.is_on_map(where_draw.x, where_draw.y)) { if(!is_out() && !univ.town.is_on_map(where_draw.x, where_draw.y)) {
draw_frills = false; draw_frills = false;