Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
sthalik committed Jan 11, 2024
1 parent 618af3c commit 6fe22e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion serialize/world-reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void reader_state::read_chunks(reader_t& s)
auto name = lookup_atlas(id);
if constexpr(std::is_same_v<ground_atlas, T>)
{
auto atlas = loader.ground_atlas(name);
auto atlas = loader.ground_atlas(name, true);
fm_soft_assert(v < atlas->num_tiles());
return { atlas, v };
}
Expand Down
3 changes: 2 additions & 1 deletion src/chunk-walls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ GL::Mesh chunk::make_wall_mesh()
const auto frames = atlas->frames(dir.corner);
auto variant = (variant_ != (uint8_t)-1 ? variant_ : vpos);
const auto depth_offset = depth_offset_for_group(Group_::corner, is_west);
const auto depth = tile_shader::depth_value(!is_west ? (float)pos.x : (float)pos.x - 1, depth_offset);
const auto pos_x = !is_west ? (float)pos.x : (float)pos.x - 1;
const auto depth = tile_shader::depth_value(pos_x, pos.y, depth_offset);
variant += !is_west ? frames.size() - 1 : 1;
variant = variant % frames.size();
const auto& frame = frames[variant];
Expand Down

0 comments on commit 6fe22e2

Please sign in to comment.