Place wall stairs above walkway surface
This commit is contained in:
Binary file not shown.
@@ -3830,7 +3830,12 @@ static void generate_chunk_border_wall(worldgen_ctx *ctx, int chunk_x, int chunk
|
|||||||
int smoothed_base = border_wall_ramp_base(ctx, side, along, wall_center, tower_spacing);
|
int smoothed_base = border_wall_ramp_base(ctx, side, along, wall_center, tower_spacing);
|
||||||
int prev_base = border_wall_ramp_base(ctx, side, along - 1, wall_center, tower_spacing);
|
int prev_base = border_wall_ramp_base(ctx, side, along - 1, wall_center, tower_spacing);
|
||||||
int next_base = border_wall_ramp_base(ctx, side, along + 1, wall_center, tower_spacing);
|
int next_base = border_wall_ramp_base(ctx, side, along + 1, wall_center, tower_spacing);
|
||||||
int ramp_slope = next_base - prev_base;
|
int stair_slope = 0;
|
||||||
|
if (next_base > smoothed_base) {
|
||||||
|
stair_slope = 1;
|
||||||
|
} else if (prev_base > smoothed_base) {
|
||||||
|
stair_slope = -1;
|
||||||
|
}
|
||||||
|
|
||||||
int height = in_tower ? tower_height : wall_height;
|
int height = in_tower ? tower_height : wall_height;
|
||||||
int top = smoothed_base + height;
|
int top = smoothed_base + height;
|
||||||
@@ -3865,9 +3870,7 @@ static void generate_chunk_border_wall(worldgen_ctx *ctx, int chunk_x, int chunk
|
|||||||
if (rel_y <= 2 || rel_y % 6 == 0 || rel_y == height - 1) {
|
if (rel_y <= 2 || rel_y % 6 == 0 || rel_y == height - 1) {
|
||||||
block = BLOCK_STONE_BRICKS;
|
block = BLOCK_STONE_BRICKS;
|
||||||
}
|
}
|
||||||
if (side_dist >= wall_center - 1 && side_dist <= wall_center + 1 && rel_y == height && ramp_slope != 0) {
|
if (side_dist >= wall_center - 1 && side_dist <= wall_center + 1 && rel_y == height) {
|
||||||
block = border_wall_ramp_stair_block(side, ramp_slope);
|
|
||||||
} else if (side_dist >= wall_center - 1 && side_dist <= wall_center + 1 && rel_y == height) {
|
|
||||||
block = BLOCK_STONE_BRICKS;
|
block = BLOCK_STONE_BRICKS;
|
||||||
}
|
}
|
||||||
if (ladder_face && rel_y >= 2 && rel_y <= height) {
|
if (ladder_face && rel_y >= 2 && rel_y <= height) {
|
||||||
@@ -3890,7 +3893,9 @@ static void generate_chunk_border_wall(worldgen_ctx *ctx, int chunk_x, int chunk
|
|||||||
}
|
}
|
||||||
if (top + 1 < CHUNK_HEIGHT) {
|
if (top + 1 < CHUNK_HEIGHT) {
|
||||||
int rail_opening = ladder_module && side_dist == wall_end && ladder_offset <= 1;
|
int rail_opening = ladder_module && side_dist == wall_end && ladder_offset <= 1;
|
||||||
if (!in_tower && !rail_opening && (side_dist == wall_start || side_dist == wall_end)) {
|
if (side_dist >= wall_center - 1 && side_dist <= wall_center + 1 && stair_slope != 0) {
|
||||||
|
set_block_with_height(out, dx, dz, top + 1, border_wall_ramp_stair_block(side, stair_slope));
|
||||||
|
} else if (!in_tower && !rail_opening && (side_dist == wall_start || side_dist == wall_end)) {
|
||||||
uint16_t rail_block = (side < 2) ? BLOCK_IRON_BARS_NS : BLOCK_IRON_BARS_EW;
|
uint16_t rail_block = (side < 2) ? BLOCK_IRON_BARS_NS : BLOCK_IRON_BARS_EW;
|
||||||
set_block_with_height(out, dx, dz, top + 1, rail_block);
|
set_block_with_height(out, dx, dz, top + 1, rail_block);
|
||||||
} else if (in_tower && phase % 4 < 2) {
|
} else if (in_tower && phase % 4 < 2) {
|
||||||
|
|||||||
Reference in New Issue
Block a user