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;
}