summaryrefslogtreecommitdiff
path: root/game.scm
diff options
context:
space:
mode:
Diffstat (limited to 'game.scm')
-rw-r--r--game.scm15
1 files changed, 8 insertions, 7 deletions
diff --git a/game.scm b/game.scm
index 30e04fb..7d8a6a3 100644
--- a/game.scm
+++ b/game.scm
@@ -688,7 +688,8 @@
(cond
((or (enemy-dead? enemy)
(enemy-out-of-bounds? enemy))
- (sound-effect-play sound:explosion)
+ (when (enemy-dead? enemy)
+ (sound-effect-play sound:explosion))
(enemy-pool-remove! pool i)
(loop i (- k 1)))
(else
@@ -1032,12 +1033,12 @@
(let ((x* (- x (/ w 2.0)))
(y* (- y(/ h 2.0))))
(or (out-of-bounds? x* y* w h)
- (rect-collides-with-level? level x* y* w h)
- ;; (if (rect-collides-with-level? level x* y* w h)
- ;; (begin
- ;; (sound-effect-play sound:bullet-hit 0.1)
- ;; #t)
- ;; #f)
+ ;; (rect-collides-with-level? level x* y* w h)
+ (if (rect-collides-with-level? level x* y* w h)
+ (begin
+ (sound-effect-play sound:bullet-hit 0.01)
+ #t)
+ #f)
(if (rect-within? x y w h
(vec2-x player-hitbox-position)
(vec2-y player-hitbox-position)