fix: world bounds for bullets
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user