Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
sthalik committed Jan 9, 2024
1 parent 03bce53 commit 977994e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/chunk-walls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,6 @@ GL::Mesh chunk::make_wall_mesh()
}
}

auto quad = get_quad(D, G, Depth);
for (auto& v : quad)
v += center;

if (pillar_ok)
{
if (dir.top.is_defined)
Expand Down Expand Up @@ -276,7 +272,7 @@ GL::Mesh chunk::make_wall_mesh()
v[j] = { quad[j], texcoords[j], depth };
}
}
else if (corner_ok)
if (corner_ok)
{
if (dir.corner.is_defined)
{
Expand Down Expand Up @@ -334,6 +330,9 @@ GL::Mesh chunk::make_wall_mesh()
const auto texcoords = Quads::texcoords_at(frame.offset, frame.size, atlas->image_size());
const auto depth_offset = depth_offset_for_group(G);
const auto depth = tile_shader::depth_value(pos, depth_offset);
auto quad = get_quad(D, G, Depth);
for (auto& v : quad)
v += center;
auto& v = vertexes[i];
for (uint8_t j = 0; j < 4; j++)
v[j] = { quad[j], texcoords[j], depth };
Expand Down

0 comments on commit 977994e

Please sign in to comment.