diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2024-08-09 16:18:07 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-08-11 11:07:55 +0200 |
| commit | ebabac8c61c448e33362102ace5732b39deb885c (patch) | |
| tree | b3e7d2b5a03299d1eca1c8538e1e12793c1ef856 /src | |
| parent | ee818eb71b40721b9158020f799c11519a4496b8 (diff) | |
b
Diffstat (limited to 'src')
| -rw-r--r-- | src/chunk-walls.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/chunk-walls.cpp b/src/chunk-walls.cpp index e3a537b3..9c854546 100644 --- a/src/chunk-walls.cpp +++ b/src/chunk-walls.cpp @@ -205,14 +205,13 @@ void do_wall_part(const Wall::Group& group, wall_atlas& A, const auto frame = variant_from_frame(frames, coord, variant_2, IsWest); constexpr Vector2 half_tile = TILE_SIZE2 * .5f; constexpr float X = half_tile.x(), Y = half_tile.y(), Z = TILE_SIZE.z(); - Quads::quad quad = { - { - {-X - Depth, -Y - Depth, Z}, - {-X, -Y - Depth, Z}, - {-X - Depth, -Y, Z}, - {-X, -Y, Z}, - } - }; + const auto Depthʹ = (float)(int)Depth; + Quads::quad quad = {{ + {-X - Depthʹ, -Y - Depthʹ, Z}, + {-X, -Y - Depthʹ, Z}, + {-X - Depthʹ, -Y, Z}, + {-X, -Y, Z}, + }}; fm_assert(frame.size.x() == Depth); fm_assert(frame.size.y() >= Depth); auto start = frame.offset + Vector2ui{0, frame.size.y()} - Vector2ui{0, Depth}; |
