mirror of
https://github.com/NohamR/Pocket-Bird.git
synced 2026-05-25 12:17:22 +00:00
Ensure bird doesn't fly up too far
This commit is contained in:
8
dist/birb.js
vendored
8
dist/birb.js
vendored
@@ -1675,7 +1675,7 @@
|
||||
insertModal(`${birdBirb()} Mode`, message);
|
||||
}),
|
||||
new Separator(),
|
||||
new MenuItem("2025.10.28.165", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.10.28.165"); }, false),
|
||||
new MenuItem("2025.10.29.2", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.10.29.2"); }, false),
|
||||
];
|
||||
|
||||
const styleElement = document.createElement("style");
|
||||
@@ -2000,6 +2000,12 @@
|
||||
birb.setAnimation(Animations.STILL);
|
||||
}
|
||||
|
||||
// Clamp startY, birdY, targetY to a bit above the top of the window
|
||||
const maxY = getWindowHeight() * 1.5;
|
||||
startY = Math.min(startY, maxY);
|
||||
birdY = Math.min(birdY, maxY);
|
||||
targetY = Math.min(targetY, maxY);
|
||||
|
||||
// Update HTML element position
|
||||
birb.setX(birdX);
|
||||
birb.setY(birdY);
|
||||
|
||||
Reference in New Issue
Block a user