diff --git a/src/windows/map.c b/src/windows/map.c index e8fb28dc31..2f81c74f05 100644 --- a/src/windows/map.c +++ b/src/windows/map.c @@ -1349,12 +1349,6 @@ static void map_window_increase_map_size() map_extend_boundary_surface(); window_map_init_map(); window_map_center_on_view_point(); - // Recalculate fences - for (int y = 0; y < RCT2_GLOBAL(RCT2_ADDRESS_MAP_MAX_XY, uint16); y += 32) { - for (int x = 0; x < RCT2_GLOBAL(RCT2_ADDRESS_MAP_MAX_XY, uint16); x += 32) { - update_park_fences(x, y); - } - } gfx_invalidate_screen(); } diff --git a/src/world/map.c b/src/world/map.c index 5013ee1f55..495a8ef87b 100644 --- a/src/world/map.c +++ b/src/world/map.c @@ -4432,6 +4432,8 @@ void map_extend_boundary_surface() newMapElement->properties.surface.slope |= slope; newMapElement->base_height = z; newMapElement->clearance_height = z; + + update_park_fences(x << 5, y << 5); } x = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE, uint16) - 2; @@ -4466,8 +4468,9 @@ void map_extend_boundary_surface() newMapElement->properties.surface.slope |= slope; newMapElement->base_height = z; newMapElement->clearance_height = z; - } + update_park_fences(x << 5, y << 5); + } } /**