From 76af2394368c4f5e5361b608099cdcf481dac8d7 Mon Sep 17 00:00:00 2001 From: San Jacobs Date: Fri, 3 Oct 2025 11:12:26 +0200 Subject: Fixed collision check --- src/tafl/tafl.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tafl/tafl.odin b/src/tafl/tafl.odin index 50c68c5..21de20f 100644 --- a/src/tafl/tafl.odin +++ b/src/tafl/tafl.odin @@ -490,7 +490,7 @@ box_clamp :: proc(parent, child : Box) -> (output : Box) { } collision_check_coords :: proc(point : [2]int, x, y, w, h : int) -> bool { - return x <= point.x && point.x <= (x+w) && y <= point.y && point.y <= (y+h) + return x <= point.x && point.x < (x+w) && y <= point.y && point.y < (y+h) } collision_check_tafl :: proc(point : [2]int, tafl : Tafl) -> bool { return collision_check_coords(point, tafl.x, tafl.y, tafl.width, tafl.height) -- cgit v1.2.1