fix: world bounds for bullets

This commit is contained in:
2025-07-12 14:35:20 +02:00
parent 65101bd3fa
commit 16c94b9c57

View File

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