summaryrefslogtreecommitdiffhomepage
path: root/src/tile-bbox.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-04 03:48:53 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-04 03:48:53 +0100
commitfd1245107175fada51b45e3c6acabe7e17783e2d (patch)
tree4b633e5180bc802cd03b2dbb4744d820c4d1d401 /src/tile-bbox.hpp
parent8ddfbc4c58b31b660893ab32a4d96af71a823912 (diff)
w
Diffstat (limited to 'src/tile-bbox.hpp')
-rw-r--r--src/tile-bbox.hpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tile-bbox.hpp b/src/tile-bbox.hpp
index 172203d8..1f924e9d 100644
--- a/src/tile-bbox.hpp
+++ b/src/tile-bbox.hpp
@@ -30,16 +30,16 @@ constexpr Pair<Vector2, Vector2> whole_tile(size_t k)
constexpr Pair<Vector2, Vector2> wall_north(size_t k, float wall_depth)
{
- constexpr auto eps = Vector2(1e-6f);
- auto min = tile_start(k) - Vector2{0, wall_depth} - eps;
- return { min, min + Vector2{TILE_SIZE2.x(), wall_depth} + eps, };
+ constexpr auto eps = Vector2(0.25f);
+ auto min = tile_start(k) - Vector2{0, wall_depth};
+ return { min - eps, min + Vector2{TILE_SIZE2.x(), wall_depth} + eps*2, };
}
constexpr Pair<Vector2, Vector2> wall_west(size_t k, float wall_depth)
{
- constexpr auto eps = Vector2(1e-6f);
- auto min = tile_start(k) - Vector2{wall_depth, 0} - eps;
- return { min, min + Vector2{wall_depth, TILE_SIZE2.y()} + eps, };
+ constexpr auto eps = Vector2(0.25f);
+ auto min = tile_start(k) - Vector2{wall_depth, 0};
+ return { min - eps, min + Vector2{wall_depth, TILE_SIZE2.y()} + eps*2, };
}
} // namespace floormat