freeze pet when pet menu is opened

This commit is contained in:
2026-01-09 00:15:00 +08:00
parent 372ad8472b
commit a47f6e02c0

View File

@@ -63,8 +63,10 @@
// 100ms per frame for the animation loop // 100ms per frame for the animation loop
if (timestamp - lastFrameTimestamp > 100) { if (timestamp - lastFrameTimestamp > 100) {
lastFrameTimestamp = timestamp; lastFrameTimestamp = timestamp;
if (!isPetMenuOpen) {
updatePosition(targetX, targetY, window.innerWidth, window.innerHeight); updatePosition(targetX, targetY, window.innerWidth, window.innerHeight);
} }
}
animationFrameId = requestAnimationFrame(frame); animationFrameId = requestAnimationFrame(frame);
} }