diff options
author | San Jacobs | 2025-10-03 11:12:26 +0200 |
---|---|---|
committer | San Jacobs | 2025-10-03 11:12:26 +0200 |
commit | 76af2394368c4f5e5361b608099cdcf481dac8d7 (patch) | |
tree | dffbba13898bb82e318bd5f0bc69dd7c1d271d49 | |
parent | 2b5cde684bfe8e4aeffb688ff60d957349ba0d53 (diff) | |
download | tafl-76af2394368c4f5e5361b608099cdcf481dac8d7.tar.gz tafl-76af2394368c4f5e5361b608099cdcf481dac8d7.tar.bz2 tafl-76af2394368c4f5e5361b608099cdcf481dac8d7.zip |
Fixed collision check
-rw-r--r-- | src/tafl/tafl.odin | 2 |
1 files changed, 1 insertions, 1 deletions
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) |