enemy bullet fix

This commit is contained in:
Bluwww 2025-12-13 12:11:22 +07:00
parent 88cf60e096
commit e193c09280

View File

@ -315,7 +315,7 @@ function drawGame() {
}
// Enemy shooting (aimed, non-homing)
if (!player1.dead && Math.random() < 0.01) {
if (!player1.dead && Math.random() < 0.01 && s.x > player1.x + 50) {
const ex = s.x;
const ey = s.y + s.height / 2;
const px = player1.x + player1.width / 2;