From 16c94b9c57a13a02613b724c844232e9295553a7 Mon Sep 17 00:00:00 2001 From: Yandrik Date: Sat, 12 Jul 2025 14:35:20 +0200 Subject: [PATCH] fix: world bounds for bullets --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index cf19f62..4cd4630 100644 --- a/index.html +++ b/index.html @@ -890,8 +890,8 @@ return false; } - // Check bounds - if (this.x < 0 || this.x > canvas.width || this.y < 0 || this.y > canvas.height) { + // Check world bounds + if (this.x < 0 || this.x > game.mapWidth * game.tileSize || this.y < 0 || this.y > game.mapHeight * game.tileSize) { return false; }