summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scenes/game.scm15
1 files changed, 7 insertions, 8 deletions
diff --git a/scenes/game.scm b/scenes/game.scm
index f49a17a..f896cd8 100644
--- a/scenes/game.scm
+++ b/scenes/game.scm
@@ -122,14 +122,13 @@ positions layer."
(- (rect-y r-wrong) (rect-height r-wrong))
(rect-width r-wrong)
(rect-height r-wrong))))
- (if (rect-intersects? hitbox r)
- (begin
- (set-rect-x! hit-vis (+ (rect-x r) (vec2-x offset)))
- (set-rect-y! hit-vis (+ (rect-y r) (vec2-y offset)))
- (set-rect-width! hit-vis (rect-width r))
- (set-rect-height! hit-vis (rect-height r))
- obj)
- #f)))
+ (and (rect-intersects? hitbox r)
+ (begin
+ (set-rect-x! hit-vis (+ (rect-x r) (vec2-x offset)))
+ (set-rect-y! hit-vis (+ (rect-y r) (vec2-y offset)))
+ (set-rect-width! hit-vis (rect-width r))
+ (set-rect-height! hit-vis (rect-height r))
+ obj))))
(object-layer-objects
(tile-map-layer-ref (asset-ref (tile-map game)) layer)))))